(self.AMP=self.AMP||[]).push({m:1,v:"2202072236000",n:"amp-analytics",ev:"0.1",l:!0,f:function(t,i){(()=>{function i(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function e(t,e){var s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return(s=s.call(t)).next.bind(s);if(Array.isArray(t)||(s=function(t,e){if(t){if("string"==typeof t)return i(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s;function n(){return s||(s=Promise.resolve(void 0))}var r=class{constructor(){this.promise=new Promise(((t,i)=>{this.resolve=t,this.reject=i}))}},{isArray:o}=Array;function h(t,i){for(let e=0;e<t.length;e++)if(i(t[e],e,t))return e;return-1}function u(t,i){const e=t.length-i.length;return e>=0&&t.indexOf(i,e)==e}function c(t,i,e){const s=e||1;for(let e=0;e<s;e++){let e=0;if(t=t.replace(/\${([^}]*)}/g,((t,s)=>(e++,i(s)))),!e)break}return t}var{hasOwnProperty:a,toString:l}=Object.prototype;function f(t){return"[object Object]"===l.call(t)}function d(t){const i=Object.create(null);return t&&Object.assign(i,t),i}function _(t,i){return a.call(t,i)}function m(t,i,e=10){const s=[],n=[];for(n.push({t:t,s:i,d:0});n.length>0;){const{d:t,s:i,t:h}=n.shift();if(s.includes(i))throw new Error("Source object has a circular reference.");if(s.push(i),h!==i)if(t>e)Object.assign(h,i);else for(var r=0,o=Object.keys(i);r<o.length;r++){const e=o[r],s=i[e];if(_(h,e)){const i=h[e];if(f(s)&&f(i)){n.push({t:i,s:s,d:t+1});continue}}h[e]=s}}return t}function A(t){return"number"==typeof t&&isFinite(t)}function p(t,i,e,s,n,r,o,h,u,c,a){return t}function P(t){return JSON.parse(t)}function E(t,i){try{return P(t)}catch(t){return null==i||i(t),null}}function T(t){return(t.ownerDocument||t).defaultView}function g(t,i){return t.replace(/^|,/g,`$&${i} `)}function v(t,i){const e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return!!e&&e.call(t,i)}function I(t,i){return t.closest?t.closest(i):function(t,i,e){let s;for(s=t;s&&void 0!==s;s=s.parentElement)if(i(s))return s;return null}(t,(t=>v(t,i)))}function R(t,i,e){return function(t,i){for(const e in i)t.setAttribute(e,i[e]);return t}(t.createElement(i),e)}function M(t,i,e){const s=i||(t=>t),{dataset:n}=t,r={},o=e||/^param(.+)/;for(const t in n){const i=t.match(o);i&&(r[s(i[1][0].toLowerCase()+i[1].substr(1))]=n[t])}return r}function b(t){return t.parent&&t.parent!=t}function y(t){const i=Object.getOwnPropertyDescriptor(t,"message");if(null!=i&&i.writable)return t;const{message:e,stack:s}=t,n=new Error(e);for(const i in t)n[i]=t[i];return n.stack=s,n}function S(t){let i=null,s="";for(var n,r=e(arguments,!0);!(n=r()).done;){const t=n.value;t instanceof Error&&!i?i=y(t):(s&&(s+=" "),s+=t)}return i?s&&(i.message=s+": "+i.message):i=new Error(s),i}function w(t){var i,e;null===(i=(e=self).__AMP_REPORT_ERROR)||void 0===i||i.call(e,t)}function V(t){const i=S.apply(null,arguments);setTimeout((()=>{throw w(i),i}))}var O=self.AMP_CONFIG||{},N=("string"==typeof O.thirdPartyFrameRegex?new RegExp(O.thirdPartyFrameRegex):O.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,C=("string"==typeof O.cdnProxyRegex?new RegExp(O.cdnProxyRegex):O.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function k(t){if(!self.document||!self.document.head)return null;if(self.location&&C.test(self.location.origin))return null;const i=self.document.head.querySelector(`meta[name="${t}"]`);return i&&i.getAttribute("content")||null}var D={thirdParty:O.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:O.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:N,cdn:O.cdnUrl||k("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:C,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:O.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:O.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:O.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:O.geoApiUrl||k("amp-geo-api")},L=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function x(t,i=""){try{return decodeURIComponent(t)}catch(t){return i}}function U(t){const i=d();if(!t)return i;let e;for(;e=L.exec(t);){const t=x(e[1],e[1]),s=e[2]?x(e[2].replace(/\+/g," "),e[2]):"";i[t]=s}return i}function H(t){const{location:i}=t||self;return U(i.originalHash||i.hash)}var j="";function F(t){const i=t||self;return i.__AMP_MODE?i.__AMP_MODE:i.__AMP_MODE=function(t){return{localDev:!1,development:q(t,H(t)),esm:!0,test:!1,rtvVersion:$(t)}}(i)}function $(t){var i;return j||(j=(null===(i=t.AMP_CONFIG)||void 0===i?void 0:i.v)||"012202072236000"),j}function q(t,i){const e=i||H(t);return["1","actions","amp","amp4ads","amp4email"].includes(e.development)||!!t.AMP_DEV_MODE}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var B=self.__AMP_LOG;function W(t,i){throw new Error("failed to call initLogConstructor")}function G(t){return B.user||(B.user=z()),function(t,i){return i&&i.ownerDocument.defaultView!=t}(B.user.win,t)?B.userForEmbed||(B.userForEmbed=z()):B.user}function z(t){return W()}function Y(){return B.dev||(B.dev=W())}function K(t,i,e,s,n,r,o,h,u,c,a){return t}function J(t,i,e,s,n,r,o,h,u,c,a){return G().assert(t,i,e,s,n,r,o,h,u,c,a)}function X(t,i){return ot(t=et(t),i)}function Z(t,i){return ot(rt(nt(t)),i)}function Q(t,i){const e=rt(nt(t));return at(e,i)?ot(e,i):null}function tt(t,i){return function(t,i){const e=ut(t,i);if(e)return e;const s=ct(t);return s[i]=function(){const t=new r,{promise:i,reject:e,resolve:s}=t;return i.catch((()=>{})),{obj:null,promise:i,resolve:s,reject:e,context:null,ctor:null}}(),s[i].promise}(rt(t),i)}function it(t,i){return ut(rt(t),i)}function et(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}function st(t,i){const e=(t.ownerDocument||t).defaultView,s=i||et(e);if(e&&e!=s&&et(e)==s)try{return e.frameElement}catch(t){}return null}function nt(t){return t.nodeType?(i=T(t),X(i,"ampdoc")).getAmpDoc(t):t;var i}function rt(t){const i=nt(t);return i.isSingleDoc()?i.win:i}function ot(t,i){K(at(t,i));const e=ct(t)[i];return e.obj||(K(e.ctor),K(e.context),e.obj=new e.ctor(e.context),K(e.obj),e.context=null,e.resolve&&e.resolve(e.obj)),e.obj}function ht(t,i,e,s,n,r){const o=ct(t);let h=o[e];h||(h=o[e]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null,sharedInstance:r||!1}),!n&&h.ctor||(h.ctor=s,h.context=i,h.sharedInstance=r||!1,h.resolve&&ot(t,e))}function ut(t,i){const e=ct(t)[i];return e?e.promise?e.promise:(ot(t,i),e.promise=Promise.resolve(e.obj)):null}function ct(t){let i=t.__AMP_SERVICES;return i||(i=t.__AMP_SERVICES={}),i}function at(t,i){const e=t.__AMP_SERVICES&&t.__AMP_SERVICES[i];return!(!e||!e.ctor)}function lt(t,i,e,s){const n=it(t,i);if(n)return n;const r=nt(t);return r.whenExtensionsKnown().then((()=>{const t=r.getExtensionVersion(e);return t?X(r.win,"extensions").waitForExtension(e,t):null})).then((e=>e?s?it(t,i):tt(t,i):null))}var ft,dt=t=>nt(t),_t=t=>function(t,i,e){const s=Q(t,i);return s?Promise.resolve(s):lt(t,i,e)}(t,"amp-script","amp-script"),mt=t=>X(t,"crypto"),At=t=>X(t,"performance"),pt=t=>X(t,"preconnect"),Pt=t=>ot(t,"timer"),Et=t=>Q(t,"url-replace"),Tt=t=>function(t,i,e,s){return lt(t,i,e,s).then((t=>function(t,i,e){return J(t,"Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.",i,e,e,e)}(t,i,e)))}(t,"userNotificationManager","amp-user-notification"),gt=t=>lt(t,"consentPolicyManager","amp-consent"),vt=t=>Q(t,"url"),It=t=>Z(t,"viewport"),Rt=t=>X(t,"xhr");function Mt(t,i,e,s){let n=t,r=e,o=t=>{try{return r(t)}catch(t){var i,e;throw null===(i=(e=self).__AMP_REPORT_ERROR)||void 0===i||i.call(e,t),t}};const h=function(){if(void 0!==ft)return ft;ft=!1;try{const t={get capture(){return ft=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return ft}(),u=!(null==s||!s.capture);return n.addEventListener(i,o,h?s:u),()=>{null==n||n.removeEventListener(i,o,h?s:u),r=null,n=null,o=null}}function bt(t,i,e,s){return Mt(t,i,e,s)}function yt(t){return t.data}function St(t,i,e,s){let n=e;const r=Mt(t,i,(t=>{try{n(t)}finally{n=null,r()}}),s);return r}function wt(t){return"AUDIO"===t.tagName||"VIDEO"===t.tagName}var Vt="active";function Ot(t,i){let e=0;return t.type===Vt&&(e=5),Math.min(i-t.time,e)}var Nt=["mousedown","mouseup","mousemove","keydown","keyup"],Ct=["mouseleave"];function kt(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function Dt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,s)}return e}function Lt(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{};i%2?Dt(Object(e),!0).forEach((function(i){kt(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Dt(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}return t}var xt="__AMP__EXPERIMENT_TOGGLES",Ut=JSON.parse('{"transport":{"beacon":true,"xhrpost":true,"image":true},"vars":{"accessReaderId":"ACCESS_READER_ID","ampGeo":"AMP_GEO","ampState":"AMP_STATE","ampVersion":"AMP_VERSION","ampdocHost":"AMPDOC_HOST","ampdocHostname":"AMPDOC_HOSTNAME","ampdocMeta":"AMPDOC_META","ampdocUrl":"AMPDOC_URL","authdata":"AUTHDATA","availableScreenHeight":"AVAILABLE_SCREEN_HEIGHT","availableScreenWidth":"AVAILABLE_SCREEN_WIDTH","backgroundState":"BACKGROUND_STATE","browserLanguage":"BROWSER_LANGUAGE","canonicalHost":"CANONICAL_HOST","canonicalHostname":"CANONICAL_HOSTNAME","canonicalPath":"CANONICAL_PATH","canonicalUrl":"CANONICAL_URL","clientId":"CLIENT_ID","consentState":"CONSENT_STATE","consentString":"CONSENT_STRING","contentLoadTime":"CONTENT_LOAD_TIME","cookie":"COOKIE","counter":"COUNTER","cumulativeLayoutShift":"CUMULATIVE_LAYOUT_SHIFT","documentCharset":"DOCUMENT_CHARSET","documentReferrer":"DOCUMENT_REFERRER","domInteractiveTime":"DOM_INTERACTIVE_TIME","domainLookupTime":"DOMAIN_LOOKUP_TIME","experimentBranches":"EXPERIMENT_BRANCHES","externalReferrer":"EXTERNAL_REFERRER","firstContentfulPaint":"FIRST_CONTENTFUL_PAINT","firstInputDelay":"FIRST_INPUT_DELAY","firstViewportReady":"FIRST_VIEWPORT_READY","fragmentParam":"FRAGMENT_PARAM","htmlAttr":"HTML_ATTR","incrementalEngagedTime":"INCREMENTAL_ENGAGED_TIME","largestContentfulPaint":"LARGEST_CONTENTFUL_PAINT","makeBodyVisible":"MAKE_BODY_VISIBLE","navRedirectCount":"NAV_REDIRECT_COUNT","navTiming":"NAV_TIMING","navType":"NAV_TYPE","pageDownloadTime":"PAGE_DOWNLOAD_TIME","pageLoadTime":"PAGE_LOAD_TIME","pageViewId":"PAGE_VIEW_ID","pageViewId64":"PAGE_VIEW_ID_64","queryParam":"QUERY_PARAM","random":"RANDOM","redirectTime":"REDIRECT_TIME","resourceTiming":"RESOURCE_TIMING","screenColorDepth":"SCREEN_COLOR_DEPTH","screenHeight":"SCREEN_HEIGHT","screenWidth":"SCREEN_WIDTH","scrollHeight":"SCROLL_HEIGHT","scrollLeft":"SCROLL_LEFT","scrollTop":"SCROLL_TOP","scrollWidth":"SCROLL_WIDTH","sessionId":"SESSION_ID","sessionCount":"SESSION_COUNT","sessionEngaged":"SESSION_ENGAGED","sessionEventTimestamp":"SESSION_EVENT_TIMESTAMP","sessionTimestamp":"SESSION_TIMESTAMP","serverResponseTime":"SERVER_RESPONSE_TIME","sourceHost":"SOURCE_HOST","sourceHostname":"SOURCE_HOSTNAME","sourcePath":"SOURCE_PATH","sourceUrl":"SOURCE_URL","tcpConnectTime":"TCP_CONNECT_TIME","timestamp":"TIMESTAMP","timezone":"TIMEZONE","timezoneCode":"TIMEZONE_CODE","title":"TITLE","totalEngagedTime":"TOTAL_ENGAGED_TIME","uach":"UACH","userAgent":"USER_AGENT","viewer":"VIEWER","viewportHeight":"VIEWPORT_HEIGHT","viewportWidth":"VIEWPORT_WIDTH"}}');function Ht(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):jt(unescape(encodeURIComponent(t)))}function jt(t){const i=new Uint8Array(t.length);for(let e=0;e<t.length;e++){const s=t.charCodeAt(e);p(s<=255),i[e]=s}return i}function Ft(t){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[e]=String.fromCharCode(t[e]);return i.join("")}var $t={"-":"+","_":"/",".":"="},qt={"+":"-","/":"_","=":"."};function Bt(t){return function(t){const i=Ft(t);return btoa(i).replace(/[+/=]/g,(t=>qt[t]))}(Ht(t))}var Wt,Gt=new Set(["c","v","a","ad"]),zt=t=>"string"==typeof t?Yt(t):t;function Yt(t,i){return Wt||(Wt=self.document.createElement("a")),function(t,i,e){return t.href="",new URL(i,t.href)}(Wt,t)}function Kt(t,i,e){if(!i)return t;const s=t.split("#",2),n=s[0].split("?",2);let r=n[0]+(n[1]?e?`?${i}&${n[1]}`:`?${n[1]}&${i}`:`?${i}`);return r+=s[1]?`#${s[1]}`:"",r}function Jt(t,i){return`${encodeURIComponent(t)}=${encodeURIComponent(i)}`}function Xt(t){const i=[];for(const s in t){let n=t[s];if(null!=n){n=o(e=n)?e:[e];for(let t=0;t<n.length;t++)i.push(Jt(s,n[t]))}}var e;return i.join("&")}function Zt(t,i,e="source"){var s;return J(null!=t,"%s %s must be available",i,e),J("https:"==(s=zt(s=t)).protocol||"localhost"==s.hostname||"127.0.0.1"==s.hostname||u(s.hostname,".localhost")||/^\/\//.test(t),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',i,e,t),t}function Qt(t){return D.cdnProxyRegex.test(zt(t).origin)}function ti(t,i){if(!t||"?"==t)return"";const e=new RegExp(`[?&]${i}\\b[^&]*`,"g"),s=t.replace(e,"").replace(/^[?&]/,"");return s?"?"+s:""}var ii,ei="-test-amp-cookie-tmp",si="None";function ni(t,i){const e=function(t){try{return t.document.cookie}catch(t){return""}}(t);if(!e)return null;const s=e.split(";");for(let t=0;t<s.length;t++){const e=s[t].trim(),n=e.indexOf("=");if(-1!=n&&x(e.substring(0,n).trim())==i){const t=e.substring(n+1).trim();return x(t,t)}}return null}function ri(t){const i=t.document.head&&t.document.head.querySelector("meta[name='amp-cookie-scope']");if(i){const e=i.getAttribute("content")||"",s=Yt(function(t){if(!Qt(t=zt(t)))return t.href;const i=t.pathname.split("/"),e=i[1];J(Gt.has(e),"Unknown path prefix in url %s",t.href);const s=i[2],n="s"==s?"https://"+decodeURIComponent(i[3]):"http://"+decodeURIComponent(s);return J(n.indexOf(".")>0,"Expected a . in origin %s",n),i.splice(1,"s"==s?3:2),n+i.join("/")+ti(t.search,"(amp_(js[^&=]*|gsa|r|kit)|usqp)")+(t.hash||"")}(t.location.href)).origin;return u(s,"."+e)?e:s.split("://")[1]}if(!Qt(t.location.href)){const i=t.location.hostname.split(".");let e=i[i.length-1];const s=function(t){let i=ei;for(;ni(t,i);)i=ei+0;return i}(t);for(let n=i.length-2;n>=0;n--)if(e=i[n]+"."+e,oi(t,s,"delete",Date.now()+1e3,e),"delete"==ni(t,s))return oi(t,s,"delete",Date.now()-1e3,e),e}return null}function oi(t,i,e,s,n,r,o){"ampproject.org"==n&&(e="delete",s=0);const h=encodeURIComponent(i)+"="+encodeURIComponent(e)+"; path=/"+(n?"; domain="+n:"")+"; expires="+new Date(s).toUTCString()+function(t,i){return i?`; SameSite=${i}`:""}(0,r)+(o?"; Secure":"");try{t.document.cookie=h}catch(t){}}function hi(t){return"string"==typeof t&&t.startsWith("amp-")&&-1!=t.indexOf("{")}var ui=["Webkit","webkit","Moz","moz","ms","O","o"],ci={"getPropertyPriority":()=>"","getPropertyValue":()=>""};function ai(t,i,e){if(di(i))return i;ii||(ii=d());let s=ii[i];if(!s||e){if(s=i,void 0===t[i]){const e=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(i),n=function(t,i){for(let e=0;e<ui.length;e++){const s=ui[e]+i;if(void 0!==t[s])return s}return""}(t,e);void 0!==t[n]&&(s=n)}e||(ii[i]=s)}return s}function li(t,i,e,s,n){const r=ai(t.style,i,n);if(!r)return;const o=s?e+s:e;di(r)?t.style.setProperty(r,o):t.style[r]=o}function fi(t,i){void 0===i&&(i=t.hasAttribute("hidden")),i?t.removeAttribute("hidden"):t.setAttribute("hidden","")}function di(t){return t.startsWith("--")}var _i="unlisten";function mi(t,i,e){const s=function(t,i){let{listeningFors:e}=t;return!e&&i&&(e=t.listeningFors=Object.create(null)),e||null}(t,e);if(!s)return s;let n=s[i];return!n&&e&&(n=s[i]=[]),n||null}function Ai(t,i){for(let e=i;e&&e!=e.parent;e=e.parent)if(e==t)return!0;return!1}function pi(t){const i={"sentinel":_i};for(let e=t.length-1;e>=0;e--){const s=t[e];if(!s.frame.contentWindow){t.splice(e,1);const{events:n}=s;for(const t in n)n[t].splice(0,1/0).forEach((t=>{t(i)}))}}}function Pi(t,i){return i?t.getAttribute("data-amp-3p-sentinel"):"amp"}function Ei(t){return t.__AMP_EMBED__}function Ti(t){return t.classList.contains("i-amphtml-fie")||!!I(t,".i-amphtml-fie")}function gi(t,i){return!(Ti(i)||Qt(t.location)||"inabox"==F(t).runtime)}var vi=class{static getTop(t){return t.top}static getLocation(t){return t.location}static getDocumentReferrer(t){return t.document.referrer}static getHostname(t){return t.location.hostname}static getUserAgent(t){return t.navigator.userAgent}static getUserLanguage(t){return t.navigator.userLanguage||t.navigator.language}static getDevicePixelRatio(){return self.devicePixelRatio||1}static getSendBeacon(t){if(t.navigator.sendBeacon)return t.navigator.sendBeacon.bind(t.navigator)}static getXMLHttpRequest(t){return t.XMLHttpRequest}static getImage(t){return t.Image}},Ii=null,Ri="*",Mi=/^[a-zA-Z0-9\-_.]+$/,bi="amp-analytics/linker";function yi(t,i){const e=(s=i)?Object.keys(s).filter((t=>{const i=Mi.test(t);return i||G().error(bi,"Invalid linker key: "+t),i})).map((t=>{return t+Ri+(i=s[t],Bt(String(i)));var i})).join(Ri):"";var s;return""===e?"":[t,Si(e),e].join(Ri)}function Si(t,i){const e=i||0;return function(t){Ii||(Ii=function(){const t=new Array(256);for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;t[i]=e}return t}());const i=Ht(t);let e=-1>>>0;for(let t=0;t<i.length;t++){const s=255&(e^i[t]);e=e>>>8^Ii[s]}return(-1^e)>>>0}([function(){const t=(new Date).getTimezoneOffset(),i=vi.getUserLanguage(window);return[vi.getUserAgent(window),t,i].join(Ri)}(),Math.floor(Date.now()/6e4)-e,t].join(Ri)).toString(36)}function wi(t){return function(t){const i=function(t){return jt(atob(t.replace(/[-_.]/g,(t=>$t[t]))))}(t);return function(t){if("undefined"!=typeof TextDecoder)return new TextDecoder("utf-8").decode(t);const i=Ft(new Uint8Array(t.buffer||t));return decodeURIComponent(escape(i))}(i)}(String(t))}var Vi="visible",Oi="amp-analytics/session-manager",Ni="sessionId",Ci="creationTimestamp",ki="accessTimestamp",Di="engaged",Li="eventTimestamp",xi="count";function Ui(t){return t.accessTimestamp+18e5<Date.now()}function Hi(t){return"amp-session:"+t}function ji(t,i=1){return{[Ni]:Math.round(1e4*Math.random()),[Ci]:Date.now(),[ki]:Date.now(),[xi]:i,[Li]:void 0,[Di]:t}}function Fi(t){return tt(t,"amp-analytics-session")}function $i(t,i="default"){return gt(t).then((t=>t?t.getConsentStringInfo(i):null))}var qi="amp-analytics/variables",Bi=/^(?:([^\s]*)(\([^)]*\))|[^]+)$/,Wi={1:"sufficient",2:"insufficient",3:"not_required",4:"unknown"},Gi=class{constructor(t,i,e){this.vars=t,this.iterations=void 0===i?2:i,this.noEncode=!!e,this.freezeVars={}}freezeVar(t){this.freezeVars[t]=!0}getVar(t){let i=this.vars[t];return null==i&&(i=""),i}};function zi(t,i,e){const s=Number(i);let{length:n}=t;return J(A(s),"Start index "+s+"in substr macro should be a number"),e&&(n=Number(e),J(A(n),"Length "+n+" in substr macro should be a number")),t.substr(s,n)}function Yi(t,i){return t&&t.length?t:i}function Ki(t,i,e){e||(e="");const s=new RegExp(i,"g");return t.replace(s,e)}function Ji(t,i,e){let s=0;e&&(s=parseInt(e,10),(0!=s&&!s||s<0)&&(G().error(qi,"Third argument in MATCH macro must be a number >= 0"),s=0));const n=new RegExp(i),r=t.match(n);return r&&r[s]?r[s]:""}function Xi(t,i,e,s){const n=Number(t),r=Number(i);J(!isNaN(n),"CALC macro - left operand must be a number"),J(!isNaN(r),"CALC macro - right operand must be a number");let o=0;switch(e){case"add":o=n+r;break;case"subtract":o=n-r;break;case"multiply":o=n*r;break;case"divide":J(r,"CALC macro - cannot divide by 0"),o=n/r;break;default:G().error(qi,"CALC macro - Invalid operation")}return se(s)?Math.round(o):o}function Zi(t){if(null==t)return"";if(o(t))return t.map(Zi).join(",");const{argList:i,name:e}=Qi(String(t));return encodeURIComponent(e)+i}function Qi(t){if(!t)return{name:"",argList:""};const i=t.match(Bi);return J(i,"Variable with invalid format found: "+t),{name:i[1]||i[0],argList:i[2]||""}}function te(t){return Z(t,"amp-analytics-variables")}function ie(t){return tt(t,"amp-analytics-variables")}function ee(t){return function(t,i="default"){return gt(t).then((t=>t?t.whenPolicyResolved(i):null))}(t).then((t=>t?Wi[t]:null))}function se(t){return"false"!==t&&""!==t&&"0"!==t&&"null"!==t&&"NaN"!==t&&"undefined"!==t}var ne="amp-analytics/config";function re(t,i,e){null==i&&(i={}),J(e||!t||!t.optout||"_gaUserPrefs.ioo"==t.optout||"__gaOptOutExtension"==t.optoutElementId,"optout property is only available to vendor config.");for(const s in t)J(e||"iframePing"!=s,"iframePing config is only available to vendor config."),_(t,s)&&(o(t[s])?(o(i[s])||(i[s]=[]),i[s]=re(t[s],i[s],e)):f(t[s])?(f(i[s])||(i[s]={}),i[s]=re(t[s],i[s],e)):i[s]=t[s]);return i}function oe(t){if(!t.requests)return t;for(const e in t.requests)_(t.requests,e)&&(t.requests[e]=f(i=t.requests[e])?i:{"baseUrl":i});var i;return function(t){if(_(t,"requests")&&_(t,"requestOrigin")){const i=t.requestOrigin;for(const e in t.requests)_(t.requests[e],"origin")||(t.requests[e].origin=i)}return t}(t)}var he=31536e6,ue=!1,ce=/nochunking=1/.test(self.location.hash),ae=n();function le(t,i,e){ce?ae.then(i):function(t){return function(t,i,e,s){const n=nt(t);ht(rt(n),n,"chunk",e)}(t,0,me),Z(t,"chunk")}(t).run(i,e)}var fe="not_run",de=class{constructor(t){this.state=fe,this.Es=t}Ts(t){if("run"!=this.state){this.state="run";try{this.Es(t)}catch(t){throw this.Is(t),t}}}ys(){return this.Es.displayName||this.Es.name}Is(t){}Ms(){return!1}Rs(){return!1}},_e=class extends de{constructor(t,i,e){super(t),this.bs=e}Is(t){var i;K((i=self.document).defaultView),ue||(ue=!0,function(t){!function(t,i){for(const e in i)li(t,e,i[e])}(t.body,{opacity:1,visibility:"visible","animation":"none"})}(i))}Ms(){return this.ws()}Rs(){return this.bs.Vs}ws(){return this.bs.ampdoc.isVisible()}},me=class{constructor(t){var i;this.ampdoc=t,this.i=t.win,this.Ss=new class{constructor(){this.gs=[]}peek(){const t=this.length;return t?this.gs[t-1].item:null}enqueue(t,i){if(isNaN(i))throw new Error("Priority must not be NaN.");const e=this.Ps(i);this.gs.splice(e,0,{item:t,priority:i})}Ps(t){let i=-1,e=0,s=this.length;for(;e<=s&&(i=Math.floor((e+s)/2),i!==this.length);)if(this.gs[i].priority<t)e=i+1;else{if(!(i>0&&this.gs[i-1].priority>=t))break;s=i-1}return i}forEach(t){let i=this.length;for(;i--;)t(this.gs[i].item)}dequeue(){const t=this.gs.pop();return t?t.item:null}get length(){return this.gs.length}},this.xs=this.Os.bind(this),this.Cs=0,this.ks=!(!this.i.navigator.scheduling||!this.i.navigator.scheduling.isInputPending),this.Ns=!1,this.vs=this.i.document.documentElement.hasAttribute("i-amphtml-no-boilerplate"),this.i.addEventListener("message",(t=>{"amp-macro-task"==yt(t)&&this.Os(null)})),this.Vs=!1,(i=t,tt(i,"viewer")).then((()=>{this.Vs=!0})),t.onVisibilityChanged((()=>{t.isVisible()&&this.Ds()}))}run(t,i){const e=new de(t);this.Ls(e,i)}runForStartup(t){const i=new _e(t,this.i,this);this.Ls(i,Number.POSITIVE_INFINITY)}Ls(t,i){this.Ss.enqueue(t,i),this.Ds()}Us(t){let i=this.Ss.peek();for(;i&&i.state!==fe;)this.Ss.dequeue(),i=this.Ss.peek();return i&&t&&this.Ss.dequeue(),i}Os(t){const i=this.Us(!0);if(!i)return this.Ns=!1,this.Cs=0,!1;let e;try{e=Date.now(),i.Ts(t)}finally{ae.then().then().then().then().then().then().then().then().then((()=>{this.Ns=!1,this.Cs+=Date.now()-e,this.Ds()}))}return!0}$s(t){if(this.vs&&(this.ks?this.i.navigator.scheduling.isInputPending():this.Cs>5))return this.Cs=0,void this.Fs();ae.then((()=>{this.xs(t)}))}Ds(){if(this.Ns)return;const t=this.Us();return t?t.Ms()?(this.Ns=!0,void this.$s(null)):void(t.Rs()&&this.i.requestIdleCallback?function(t,i,e,s){const n=Date.now();t.requestIdleCallback((function i(e){if(e.timeRemaining()<15){const r=2e3-(Date.now()-n);r<=0||e.didTimeout?s(e):t.requestIdleCallback(i,{timeout:r})}else s(e)}),{timeout:2e3})}(this.i,0,0,this.xs):this.Fs()):void 0}Fs(){this.i.postMessage("amp-macro-task","*")}},Ae="amp-analytics/cookie-writer",pe={"referrerDomains":!0,"enabled":!0,"cookiePath":!0,"cookieMaxAge":!0,"cookieSecure":!0,"cookieDomain":!0,"sameSite":!0,"SameSite":!0,"secure":!0},Pe=class{constructor(){this.Tt=null}add(t){return this.Tt||(this.Tt=[]),this.Tt.push(t),()=>{this.remove(t)}}remove(t){this.Tt&&function(t,i){const e=t.indexOf(i);-1!=e&&t.splice(e,1)}(this.Tt,t)}removeAll(){this.Tt&&(this.Tt.length=0)}fire(t){if(this.Tt)for(var i,s=e(this.Tt,!0);!(i=s()).done;)(0,i.value)(t)}getHandlerCount(){var t,i;return null!==(t=null===(i=this.Tt)||void 0===i?void 0:i.length)&&void 0!==t?t:0}},Ee="video-session-visible",Te="video-seconds-played",ge=["video-ended","video-pause","video-play","video-session","video-session-visible","video-seconds-played","video-hosted-custom","video-percentage-played","video-ad-start","video-ad-end"],ve=/^vars(.+)/,Ie=function(){},Re="amp-analytics/events",Me="click",be="browser-event",ye="custom",Se="hidden",we="ini-load",Ve="render-start",Oe="scroll",Ne="story",Ce="timer",ke="video",De="visible",Le=["ampdoc","embed"],xe=Object.freeze({[Me]:{name:Me,allowedFor:Le.concat(["timer"]),klass:function(t){return new Ge(t)}},[be]:{name:be,allowedFor:Le.concat(["timer"]),klass:function(t){return new qe(t)}},[ye]:{name:ye,allowedFor:Le.concat(["timer"]),klass:function(t){return new Be(t)}},[Se]:{name:De,allowedFor:Le.concat(["timer"]),klass:function(t){return new Ze(t)}},[we]:{name:we,allowedFor:Le.concat(["timer","visible"]),klass:function(t){return new Ke(t)}},[Ve]:{name:Ve,allowedFor:Le.concat(["timer","visible"]),klass:function(t){return new Ye(t)}},[Oe]:{name:Oe,allowedFor:Le.concat(["timer"]),klass:function(t){return new ze(t)}},[Ne]:{name:Ne,allowedFor:Le,klass:function(t){return new We(t)}},[Ce]:{name:Ce,allowedFor:Le,klass:function(t){return new Je(t)}},[ke]:{name:ke,allowedFor:Le.concat(["timer"]),klass:function(t){return new Xe(t)}},[De]:{name:De,allowedFor:Le.concat(["timer"]),klass:function(t){return new Ze(t)}}});function Ue(t){J(!o(t)||new Set(t).size===t.length,"Cannot have duplicate selectors in selectors list: %s",t)}function He(t){return t.startsWith("video")?ke:"blur"===(i=t)||"change"===i?be:t.startsWith("story")?Ne:function(t){return"click"===(i=t)||"browser-event"===i||"custom"===i||"hidden"===i||"ini-load"===i||"render-start"===i||"scroll"===i||"story"===i||"timer"===i||"video"===i||"visible"===i;var i}(t)?_(xe,t)?xe[t].name:t:ye;var i}function je(t){const i={};return Object.keys(xe).forEach((e=>{_(xe,e)&&-1!=xe[e].allowedFor.indexOf(t)&&(i[e]=xe[e].klass)})),i}var Fe=class{constructor(t,i,e={},s=!0){this.target=t,this.type=i,this.vars=s?function(t,i){const e=M(t,void 0,ve);return m(e,i,0),e}(t,e):e}},$e=class{constructor(t){this.root=t}dispose(){}add(t,i,e,s){}},qe=class extends $e{constructor(t){super(t),this.YAt=new Pe,this.ZAt={},this.QAt=this.YAt.fire.bind(this.YAt),this.tEt=function(t,i,e){let s=0,n=0,r=null;function o(){s=0;const e=500-(t.Date.now()-n);var h;e>0?s=t.setTimeout(o,e):(h=r,r=null,i.apply(null,h))}return function(...i){n=t.Date.now(),r=i,s||(s=t.setTimeout(o,500))}}(this.root.ampdoc.win,this.QAt)}dispose(){const t=this.root.getRoot();Object.keys(this.ZAt).forEach((i=>{t.removeEventListener(i,this.tEt)})),this.QAt=null,this.YAt=null}add(t,i,s,n){J(function(t,i){const s=function(t){var i,s,n,r,h;if(t[xt])return t[xt];t[xt]=d();const u=t[xt];p(u);const c=Lt(Lt({},null!==(i=t.AMP_CONFIG)&&void 0!==i?i:{}),null!==(s=t.AMP_EXP)&&void 0!==s?s:P((null===(n=t.__AMP_EXP)||void 0===n?void 0:n.textContent)||"{}"));for(const t in c){const i=c[t];"number"==typeof i&&i>=0&&i<=1&&(u[t]=Math.random()<i)}const a=null===(r=t.AMP_CONFIG)||void 0===r?void 0:r["allow-doc-opt-in"];if(o(a)&&a.length){const i=t.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(i)for(var l,f,_=e((null===(l=i.getAttribute("content"))||void 0===l?void 0:l.split(","))||[],!0);!(f=_()).done;){const t=f.value;a.includes(t)&&(u[t]=!0)}}Object.assign(u,function(t){var i;let s="";try{var n;"localStorage"in t&&(s=null!==(n=t.localStorage.getItem("amp-experiment-toggles"))&&void 0!==n?n:"")}catch(t){}const r=(null===(i=s)||void 0===i?void 0:i.split(/\s*,\s*/g))||[],o=d();for(var h,u=e(r,!0);!(h=u()).done;){const t=h.value;t&&("-"==t[0]?o[t.substr(1)]=!1:o[t]=!0)}return o}(t));const m=null===(h=t.AMP_CONFIG)||void 0===h?void 0:h["allow-url-opt-in"];if(o(m)&&m.length){const i=U(t.location.originalHash||t.location.hash);for(var A,E=e(m,!0);!(A=E()).done;){const t=A.value,e=i[`e-${t}`];"1"==e&&(u[t]=!0),"0"==e&&(u[t]=!1)}}return u}(t);return!!s["analytics-browser-events"]}(this.root.ampdoc.win),'expected global "analytics-browser-events" experiment to be enabled');const{"on":r,"selectionMethod":h=null,"selector":u}=s;J(null==u?void 0:u.length,"Missing required selector on browser event trigger"),Ue(u);const c=this.root.getElements(t,u,h,!1);return this.ZAt[r]||(this.root.getRootElement().addEventListener(r,this.tEt,!0),this.ZAt[r]=!0),this.YAt.add((t=>{t.type===r&&c.then((i=>{i.forEach((i=>{const e=t.target;i.contains(e)&&n(new Fe(i,r,{}))}))}))}))}},Be=class extends $e{constructor(t){super(t),this.YAt={},this.iEt={},this.eEt={},setTimeout((()=>{this.iEt=void 0}),1e4)}dispose(){this.iEt=void 0,this.eEt=void 0;for(const t in this.YAt)this.YAt[t].removeAll()}add(t,i,e,s){let n=e.selector;n||(n=":root");const r=e.selectionMethod||null,o=this.root.getElement(t,n,r),h=i.startsWith("sandbox-"),u=h?this.eEt&&this.eEt[i]:this.iEt&&this.iEt[i];if(u){const t=u.length;o.then((e=>{setTimeout((()=>{for(let i=0;i<t;i++){const t=u[i];e.contains(t.target)&&s(t)}h&&(this.eEt[i]=void 0)}),1)}))}let c=this.YAt[i];return c||(c=new Pe,this.YAt[i]=c),this.YAt[i].add((t=>{o.then((i=>{i.contains(t.target)&&s(t)}))}))}trigger(t){const i=t.type,e=i.startsWith("sandbox-"),s=this.YAt[i];s&&(s.fire(t),e)||(e?(this.eEt[i]=this.eEt[i]||[],this.eEt[i].push(t)):this.iEt&&(this.iEt[i]=this.iEt[i]||[],this.iEt[i].push(t)))}},We=class extends Be{constructor(t){super(t)}add(t,i,e,s){const n=this.root.getRootElement(),r=this.iEt&&this.iEt[i];if(r){const t=r.length;for(let i=0;i<t;i++){const t=r[i];this.sEt(t,n,e,s)}}let o=this.YAt[i];return o||(o=new Pe,this.YAt[i]=o),this.YAt[i].add((t=>{this.sEt(t,n,e,s)}))}sEt(t,i,e,s){const n=t.type,r=t.vars,o=e.storySpec||{},h=void 0===o.repeat||o.repeat,u=r.eventDetails,c=e.tagName;c&&u.tagName&&c.toLowerCase()!==u.tagName||!1===h&&u.repeated||s(new Fe(i,n,r))}trigger(t){const i=t.type,e=this.YAt[i];e&&e.fire(t),this.iEt&&(this.iEt[i]=this.iEt[i]||[],this.iEt[i].push(t))}},Ge=class extends $e{constructor(t){super(t),this.nEt=new Pe,this.rEt=this.nEt.fire.bind(this.nEt),this.root.getRoot().addEventListener("click",this.rEt)}dispose(){this.root.getRoot().removeEventListener("click",this.rEt),this.nEt.removeAll()}add(t,i,e,s){const n=J(e.selector,"Missing required selector on click trigger"),r=e.selectionMethod||null;return this.nEt.add(this.root.createSelectiveListener(this.lf.bind(this,s),t.parentElement||t,n,r))}lf(t,i,e){t(new Fe(i,"click"))}},ze=class extends $e{constructor(t){super(t),this.Bc=t,this.oEt=null}dispose(){null!==this.oEt&&(this.Bc.getScrollManager().removeScrollHandler(this.oEt),this.oEt=null)}add(t,i,e,s){if(!e.scrollSpec)return G().error(Re,"Missing scrollSpec on scroll trigger."),Ie;if(!Array.isArray(e.scrollSpec.verticalBoundaries)&&!Array.isArray(e.scrollSpec.horizontalBoundaries))return G().error(Re,"Boundaries are required for the scroll trigger to work."),Ie;const n=this.hEt(e.scrollSpec.verticalBoundaries),r=this.hEt(e.scrollSpec.horizontalBoundaries),o=!!e.scrollSpec.useInitialPageSize;return this.oEt=this.gm.bind(this,r,n,o,s),this.Bc.getScrollManager().addScrollHandler(this.oEt)}gm(t,i,e,s,n){const{scrollHeight:r,scrollWidth:o}=e?n.initialSize:n;this.uEt(i,100*(n.top+n.height)/r,"verticalScrollBoundary",s),this.uEt(t,100*(n.left+n.width)/o,"horizontalScrollBoundary",s)}hEt(t){const i={};if(!t||!Array.isArray(t))return i;for(let e=0;e<t.length;e++){let s=t[e];if("number"!=typeof s||!isFinite(s))return G().error(Re,"Scroll trigger boundaries must be finite."),i;s=Math.min(5*Math.round(s/5),100),i[s]=!1}return i}uEt(t,i,e,s){if(i)for(const n in t){if(!_(t,n))continue;const r=parseInt(n,10);if(r>i||t[r])continue;t[r]=!0;const o={};o[e]=n,s(new Fe(this.Bc.getRootElement(),Oe,o,!1))}}},Ye=class extends $e{constructor(t){super(t)}dispose(){}add(t,i,e,s){let n,r;const o=e.selector||":root";if(":root"==o||":host"==o)n=this.root.getRootElement(),r=this.getRootSignal(i);else{const s=e.selectionMethod;r=this.root.getAmpElement(t.parentElement||t,o,s).then((t=>(n=t,this.getElementSignal(i,n))))}return r.then((()=>{s(new Fe(n,i))})),Ie}getRootSignal(t){return this.root.signals().whenSignal(t)}getElementSignal(t,i){return"function"!=typeof i.signals?n():i.signals().whenSignal(t)}},Ke=class extends $e{constructor(t){super(t)}dispose(){}add(t,i,e,s){let n,r;const o=e.selector||":root";if(":root"==o||":host"==o)n=this.root.getRootElement(),r=this.getRootSignal();else{const i=e.selectionMethod;r=this.root.getAmpElement(t.parentElement||t,o,i).then((t=>(n=t,this.getElementSignal("ini-load",n))))}return r.then((()=>{s(new Fe(n,i))})),Ie}getRootSignal(){return this.root.whenIniLoaded()}getElementSignal(t,i){if("function"!=typeof i.signals)return n();const e=i.signals();return Promise.race([e.whenSignal("ini-load"),e.whenSignal("load-end")])}},Je=class extends $e{constructor(t){super(t),this.cEt={},this.aEt=1}getTrackedTimerKeys(){return Object.keys(this.cEt)}dispose(){this.getTrackedTimerKeys().forEach((t=>{this.lEt(t)}))}add(t,i,e,s){const n=e.timerSpec;J(n&&"object"==typeof n,"Bad timer specification");const r="startSpec"in n?n.startSpec:null;J(!r||"object"==typeof r,"Bad timer start specification");const o="stopSpec"in n?n.stopSpec:null;J(!r&&!o||"object"==typeof o,"Bad timer stop specification");const h=this.fEt();let u,c;if(r){const e=this.dEt(r);J(e,"Cannot track timer start"),u=e.add.bind(e,t,r.on,r,this._Et.bind(this,h,i,s))}if(o){const e=this.dEt(o);J(e,"Cannot track timer stop"),c=e.add.bind(e,t,o.on,o,this._Et.bind(this,h,i,s))}const a=new class{constructor(t,i,e){this.mEt=void 0,J("interval"in t,"Timer interval specification required"),this.AEt=Number(t.interval)||0,J(this.AEt>=.5,"Bad timer interval specification"),this.pEt="maxTimerLength"in t?Number(t.maxTimerLength):7200,J(this.pEt>0,"Bad maxTimerLength specification"),this.PEt="maxTimerLength"in t,this.EEt=!("immediate"in t)||Boolean(t.immediate),this.TEt=null,this.gEt=null,this.vEt=null,this.IEt=i||null,this.REt=e||null,this.yo=void 0,this.MEt=void 0}init(t){this.IEt?this.bEt():t()}dispose(){this.yEt(),this.SEt()}bEt(){this.IEt&&(this.gEt=this.IEt())}SEt(){this.gEt&&(this.gEt(),this.gEt=null)}wEt(){if(this.REt)try{this.vEt=this.REt()}catch(t){throw this.dispose(),t}}yEt(){this.vEt&&(this.vEt(),this.vEt=null)}isRunning(){return!!this.mEt}startIntervalInWindow(t,i,e){this.isRunning()||(this.yo=Date.now(),this.MEt=void 0,this.TEt=i,this.mEt=t.setInterval((()=>{i()}),1e3*this.AEt),(!this.REt||this.REt&&this.PEt)&&t.setTimeout((()=>{e()}),1e3*this.pEt),this.SEt(),this.EEt&&i(),this.wEt())}VEt(t){this.isRunning()&&(this.TEt(),this.TEt=null,t.clearInterval(this.mEt),this.mEt=void 0,this.MEt=void 0,this.yEt(),this.bEt())}OEt(){return this.yo?Date.now()-(this.MEt||this.yo):0}getTimerVars(){let t=0;return this.isRunning()&&(t=this.OEt(),this.MEt=Date.now()),{"timerDuration":t,"timerStart":this.yo||0}}}(n,u,c);return this.cEt[h]=a,a.init(this.NEt.bind(this,h,i,s)),()=>{this.lEt(h)}}fEt(){return++this.aEt}dEt(t){const i=He(G().assertString(t.on));return this.root.getTrackerForAllowlist(i,je("timer"))}_Et(t,i,e){const s=this.cEt[t];s&&(s.isRunning()?this.VEt(t):this.NEt(t,i,e))}NEt(t,i,e){this.cEt[t].startIntervalInWindow(this.root.ampdoc.win,(()=>{e(this.CEt(t,i))}),this.lEt.bind(this,t))}VEt(t){this.cEt[t].VEt(this.root.ampdoc.win)}CEt(t,i){return new Fe(this.root.getRootElement(),i,this.cEt[t].getTimerVars(),!1)}lEt(t){this.cEt[t]&&(this.VEt(t),this.cEt[t].dispose(),delete this.cEt[t])}},Xe=class extends $e{constructor(t){super(t),this.kEt=new Pe,this.QAt=this.kEt.fire.bind(this.kEt),ge.forEach((t=>{this.root.getRoot().addEventListener(t,this.QAt)}))}dispose(){const t=this.root.getRoot();ge.forEach((i=>{t.removeEventListener(i,this.QAt)})),this.QAt=null,this.kEt=null}add(t,i,e,s){const n=e.videoSpec||{},r=J(e.selector||n.selector,"Missing required selector on video trigger");J(r.length,"Missing required selector on video trigger"),Ue(r);const o=e.selectionMethod||null,h=this.root.getElements(t,r,o,!1),u=n["end-session-when-invisible"],c=n["exclude-autoplay"],a=n.interval,l=n.percentages,f=e.on;let d=0,_=0;return this.kEt.add((t=>{const{type:i}=t,e=yt(t),n=function(t,i){return t==Ee?"video-session":"video-hosted-custom"==t?i["__amp:eventType"]:t}(i,e);if(n!==f)return;if(n===Te&&!a)return void G().error(Re,"video-seconds-played requires interval spec with non-zero value");if(n===Te&&(d++,d%a!=0))return;if("video-percentage-played"===n){if(!l)return void G().error(Re,"video-percentage-played requires percentages spec.");for(let t=0;t<l.length;t++){const i=l[t];if(i<=0||i%5!=0)return void G().error(Re,"Percentages must be set in increments of %s with non-zero values",5)}const t=e.normalizedPercentage,i=parseInt(t,10);if(K(A(i)),K(i%5==0),_==i&&l.length>1)return;if(l.indexOf(i)<0)return;_=i}if(i===Ee&&!u)return;if(c&&"playing_auto"===e.state)return;const r=t.target;h.then((t=>{t.forEach((t=>{if(!t.contains(r))return;const i=function(t){if(!t)return{};const i=Lt({},t);return delete i["__amp:eventType"],i}(e);s(new Fe(t,n,i))}))}))}))}},Ze=class extends $e{constructor(t){super(t),this.DEt={}}dispose(){}add(t,i,e,s){const n=e.visibilitySpec||{},r=e.selector||n.selector,o=n.waitFor;let h=n.reportWhen,u=null;h&&J(!n.repeat,"reportWhen and repeat are mutually exclusive."),i===Se&&(h&&G().error(Re,'ReportWhen should not be defined when eventType is "hidden"'),h="documentHidden");const c=this.root.getVisibilityManager();if("documentHidden"==h?u=this.LEt.bind(this):"documentExit"==h?u=this.xEt.bind(this):J(!h,'reportWhen value "%s" not supported.',h),!r||":root"==r||":host"==r){const t=o||(r?"ini-load":"none");return c.listenRoot(n,this.getReadyPromise(t),u,this.UEt.bind(this,i,s,this.root.getRootElement()))}const a=e.selectionMethod||n.selectionMethod;Ue(r);const l=this.root.getElements(t.parentElement||t,r,a).then((t=>{const e=[];for(let r=0;r<t.length;r++)e.push(c.listenElement(t[r],n,this.getReadyPromise(o,t[r]),u,this.UEt.bind(this,i,s,t[r])));return e}));return function(){l.then((t=>{for(let i=0;i<t.length;i++)t[i]()}))}}LEt(){const{ampdoc:t}=this.root;return t.isVisible()?new Promise((i=>{t.onVisibilityChanged((()=>{t.isVisible()||i()}))})):n()}xEt(){const t=new r,{win:i}=this.root.ampdoc;let e,s;return this.HEt()||i.addEventListener("unload",e=()=>{i.removeEventListener("unload",e),t.resolve()}),i.addEventListener("pagehide",s=()=>{i.removeEventListener("pagehide",s),t.resolve()}),t.promise}HEt(){return"onpagehide"in this.root.ampdoc.win}getReadyPromise(t,i){if(i&&(function(t){const i=t.tagName;return i.startsWith("AMP-")&&!("AMP-STICKY-AD-TOP-PADDING"==i||"AMP-BODY"==i)}(i)?t=t||"ini-load":J(!t||"none"==t,"waitFor for non-AMP elements must be none or null. Found %s",t)),!t||"none"==t)return null;const e=je("visible");J(void 0!==e[t],"waitFor value %s not supported",t);const s=this.DEt[t]||this.root.getTrackerForAllowlist(t,e);return s?(this.DEt[t]=s,i?s.getElementSignal(t,i):s.getRootSignal(t)):null}UEt(t,i,e,s){const n=M(e,void 0,ve);for(const t in n)s[t]=n[t];i(new Fe(e,t,s,!1))}},Qe="inside";function ts(t,i,e,s){return{left:t,top:i,width:e,height:s,bottom:i+s,right:t+e,x:t,y:i}}function is(t,i,e){const s=(n={top:e,bottom:e+i.getHeight(),left:0,right:i.getWidth()},ts(Number(n.left),Number(n.top),Number(n.width),Number(n.height)));var n,r,o;return o=s,(r=t).top<=o.bottom&&o.top<=r.bottom&&r.left<=o.right&&o.left<=r.right?Qe:function(t,i){return t.top<i.top?"top":t.bottom>i.bottom?"bottom":Qe}(t,s)}function es(t){const i=function(t){const i=[];if(!t)return i;let e,s=t;i.push(s);for(let t=0;t<50;t++)if(e=s.parentNode||s.parentElement,e&&1==e.nodeType)s=e,i.push(s);else{if(!e||9!=e.nodeType)break;if(e=s.ownerDocument.defaultView.frameElement,!e||1!=e.nodeType)break;s=e,i.push(s)}return i}(t.parentElement);i.push(t);let e,s=1;for(let t=0;t<i.length;t++)if(e=ss(i[t]),e<s&&(s=e),0===s)return s;return s}function ss(t){const i=window;if(!t)return 1;const{opacity:e,visibility:s}=function(t,i){return t.getComputedStyle(i)||ci}(i,t);if("hidden"===s)return 0;const n=""===e?1:parseFloat(e);return isNaN(n)?1:n}var ns=class{constructor(t,i){this.jEt=i,this.FEt={"visiblePercentageMin":Number(t.visiblePercentageMin)/100||0,"visiblePercentageMax":Number(t.visiblePercentageMax)/100||1,"totalTimeMin":Number(t.totalTimeMin)||0,"totalTimeMax":Number(t.totalTimeMax)||1/0,"continuousTimeMin":Number(t.continuousTimeMin)||0,"continuousTimeMax":Number(t.continuousTimeMax)||1/0},"0"===String(t.visiblePercentageMax).trim()&&(this.FEt.visiblePercentageMax=0),this.$Et=void 0!==t.reportWhen,this.qEt=!0===t.repeat,this.BEt=new Pe;const e=new r;this.WEt=e.promise,this.GEt=e.resolve,this.WEt.then((()=>{this.BEt.fire()})),this.zEt=[],this.YEt=Date.now(),this.xi=!0,this.KEt=!0,this.JEt=null,this.XEt=null,this.ZEt=!1,this.QEt=!1,this.tTt=0,this.iTt=0,this.eTt=0,this.sTt=0,this.nTt=0,this.Zc=0,this.Ti=0,this.rTt=0,this.oTt=0,this.hTt=0,this.uTt=0,this.cTt=0,this.aTt=!1,this.lTt=!1,this.fTt=null}ar(){K(!this.GEt);const t=new r;this.WEt=t.promise,this.GEt=t.resolve,this.WEt.then((()=>{this.BEt.fire()})),this.fTt=null,this.QEt=!1,this.ZEt=!1,this.tTt=0,this.iTt=0,this.eTt=0,this.Zc=0,this.sTt=0,this.nTt=0,this.Ti=0,this.oTt=0,this.hTt=0,this.uTt=0,this.lTt=!1}maybeDispose(){this.qEt||this.dispose()}dispose(){this.XEt&&(clearTimeout(this.XEt),this.XEt=null),this.fTt&&(clearTimeout(this.fTt),this.fTt=null),this.zEt.forEach((t=>{t()})),this.zEt.length=0,this.GEt=null,this.BEt&&(this.BEt.removeAll(),this.BEt=null)}unsubscribe(t){this.zEt.push(t)}onTriggerEvent(t){this.BEt&&this.BEt.add(t),this.WEt&&!this.GEt&&t()}setReady(t){this.xi=t,this.update()}setReportReady(t){this.KEt=!1,this.JEt=t}dTt(){return this.xi?this.jEt():0}update(){this.Kt(this.dTt())}getState(t){return{"firstSeenTime":rs(this.sTt,t),"lastSeenTime":rs(this.nTt,t),"lastVisibleTime":rs(this.Ti,t),"firstVisibleTime":rs(this.Zc,t),"maxContinuousVisibleTime":this.iTt,"totalVisibleTime":this.eTt,"loadTimeVisibility":100*this.rTt||0,"minVisiblePercentage":100*this.oTt,"maxVisiblePercentage":100*this.hTt}}Kt(t){if(this.lTt)this._Tt(t)||this.ar();else if(this.GEt)if(this.mTt(t)||this.$Et){if(this.XEt&&(clearTimeout(this.XEt),this.XEt=null),this.KEt)this.GEt(),this.GEt=null,this.qEt&&(this.lTt=!0,this.tTt=0);else if(this.JEt){const t=this.JEt();this.JEt=null,t.then((()=>{this.KEt=!0,this.update()}))}}else if(this.ZEt&&!this.XEt){const t=this.ATt();t>0&&(this.XEt=setTimeout((()=>{this.XEt=null,this.update()}),t))}else!this.ZEt&&this.XEt&&(clearTimeout(this.XEt),this.XEt=null)}_Tt(t){return K(t>=0&&t<=1),1==this.FEt.visiblePercentageMin?1==t:0==this.FEt.visiblePercentageMax?0==t:t>this.FEt.visiblePercentageMin&&t<=this.FEt.visiblePercentageMax}mTt(t){K(t>=0&&t<=1);const i=Date.now();t>0&&(this.sTt=this.sTt||i,this.nTt=i,!this.rTt&&i-this.YEt<300&&(this.rTt=t));const e=this.ZEt,s=this.uTt?i-this.uTt:0;return this.ZEt=this._Tt(t),this.ZEt?(this.QEt=!0,e?(this.eTt+=s,this.tTt+=s,this.iTt=Math.max(this.iTt,this.tTt)):(K(!this.uTt),this.Zc=this.Zc||i),this.uTt=i,this.oTt=this.oTt>0?Math.min(this.oTt,t):t,this.hTt=Math.max(this.hTt,t),this.Ti=i):e&&(K(this.uTt>0),this.iTt=Math.max(this.iTt,this.tTt+s),this.uTt=0,this.eTt+=s,this.tTt=0,this.Ti=i),this.QEt&&this.eTt>=this.FEt.totalTimeMin&&this.eTt<=this.FEt.totalTimeMax&&this.iTt>=this.FEt.continuousTimeMin&&this.iTt<=this.FEt.continuousTimeMax}maybeSetInitialScrollDepth(t){this.aTt||(this.cTt=t,this.aTt=!0)}getInitialScrollDepth(){return this.cTt}ATt(){const t=Math.max(this.FEt.continuousTimeMin-this.tTt,0),i=Math.max(this.FEt.totalTimeMin-this.eTt,0),e=Math.max(t,i);return Math.min(e,t||1/0,i||1/0)}};function rs(t,i){return t>=i?t-i:0}var os="amp-analytics/visibility-manager",hs="__AMP_VIS",us=[0,.05,.1,.15,.2,.25,.3,.35,.4,.45,.5,.55,.6,.65,.7,.75,.8,.85,.9,.95,1],cs=1;function as(t){let i=t.__AMP_VIS_ID;return i||(i=++cs,t.__AMP_VIS_ID=i),i}function ls(t){return t[hs]||(t[hs]=function(t){const i=dt(t),e=st(t),s=e&&Ei(e),n=e&&function(t){if(Node.prototype.getRootNode)return t.getRootNode();let i;for(i=t;i.parentNode&&(!(e=i)||"I-AMPHTML-SHADOW-ROOT"!=e.tagName&&(11!=e.nodeType||"[object ShadowRoot]"!==Object.prototype.toString.call(e)));i=i.parentNode);var e;return i}(e);return s&&n?new _s(ls(n),s):new ds(i)}(t)),t[hs]}var fs=class{constructor(t,i){this.parent=t,this.ampdoc=i,this.pTt=0,this.PTt=[],this.zL=null,this.zEt=[],this.ETt=0,this.parent&&this.parent.TTt(this);const e=It(this.ampdoc);e.onChanged((()=>{this.maybeUpdateMaxScrollDepth(e.getScrollTop())}))}TTt(t){this.zL||(this.zL=[]),this.zL.push(t)}gTt(t){if(this.zL){const i=this.zL.indexOf(t);-1!=i&&this.zL.splice(i,1)}}dispose(){this.setRootVisibility(0);for(let t=this.PTt.length-1;t>=0;t--)this.PTt[t].dispose();if(this.zEt.forEach((t=>{t()})),this.zEt.length=0,this.parent&&this.parent.gTt(this),this.zL)for(let t=0;t<this.zL.length;t++)this.zL[t].dispose()}unsubscribe(t){this.zEt.push(t)}getStartTime(){}isBackgrounded(){}isBackgroundedAtStart(){}getRootMinOpacity(){}getRootLayoutBox(){}getRootVisibility(){return this.parent?this.parent.getRootVisibility()>0?this.pTt:0:this.pTt}setRootVisibility(t){if(this.pTt=t,this.vTt(),this.zL)for(let t=0;t<this.zL.length;t++)this.zL[t].vTt()}maybeUpdateMaxScrollDepth(t){t>this.ETt&&(this.ETt=t)}getMaxScrollDepth(){return this.ETt}vTt(){for(let t=0;t<this.PTt.length;t++)this.PTt[t].update()}listenRoot(t,i,e,s){const n=this.getRootVisibility.bind(this);return this.ITt(n,t,i,e,s)}listenElement(t,i,e,s,n){const r=this.getElementVisibility.bind(this,t);return this.ITt(r,i,e,s,n,t)}ITt(t,i,e,s,n,r){if(i.visiblePercentageThresholds&&null==i.visiblePercentageMin&&null==i.visiblePercentageMax){const h=[],u=i.visiblePercentageThresholds;if(!u||!o(u))return G().error(os,"invalid visiblePercentageThresholds"),()=>{};for(let c=0;c<u.length;c++){const a=u[c];if(!o(a)||2!=a.length){G().error(os,"visiblePercentageThresholds entry length is not 2");continue}if(!A(a[0])||!A(a[1])){G().error(os,"visiblePercentageThresholds entry is not valid number");continue}const l=Number(a[0]),f=Number(a[1]);if(l<0||f>100||l>f||l==f&&100!=l&&0!=f){G().error(os,"visiblePercentageThresholds entry invalid min/max value");continue}const d=i;d.visiblePercentageMin=l,d.visiblePercentageMax=f;const _=new ns(d,t,It(this.ampdoc));h.push(this.bH(_,i,e,s,n,r))}return()=>{h.forEach((t=>t()))}}const h=new ns(i,t,It(this.ampdoc));return this.bH(h,i,e,s,n,r)}bH(t,i,e,s,n,r){s&&t.setReportReady(s);const o=It(this.ampdoc),h=o.getScrollTop();return this.maybeUpdateMaxScrollDepth(h),e?(t.setReady(!1),e.then((()=>{t.setReady(!0),t.maybeSetInitialScrollDepth(h)}))):t.maybeSetInitialScrollDepth(h),t.onTriggerEvent((()=>{const i=this.getStartTime(),e=t.getState(i);let s;if(e.backgrounded=this.isBackgrounded()?1:0,e.backgroundedAtStart=this.isBackgroundedAtStart()?1:0,e.totalTime=Date.now()-i,r){e.elementId=r.id,e.opacity=es(r),s=o.getLayoutRect(r);const t=this.getElementVisibility(r),i=this.getElementIntersectionRect(r);Object.assign(e,{"intersectionRatio":t,"intersectionRect":JSON.stringify(i)})}else e.opacity=this.getRootMinOpacity(),e.intersectionRatio=this.getRootVisibility(),s=this.getRootLayoutBox();t.maybeDispose(),s&&(Object.assign(e,{"elementX":s.left,"elementY":s.top,"elementWidth":s.width,"elementHeight":s.height}),e.initialScrollDepth=is(s,o,t.getInitialScrollDepth()),e.maxScrollDepth=is(s,o,this.getMaxScrollDepth())),n(e)})),this.PTt.push(t),t.unsubscribe((()=>{const i=this.PTt.indexOf(t);-1!=i&&this.PTt.splice(i,1)})),r&&t.unsubscribe(this.observe(r,(()=>t.update()))),t.update(),function(){t.dispose()}}observe(t,i){}getElementVisibility(t){}getElementIntersectionRect(t){}},ds=class extends fs{constructor(t){if(super(null,t),this.aa=It(t),this.RTt=!t.isVisible(),this.MTt=this.isBackgrounded(),this.bTt=d(),this.Mv=null,"inabox"==F(this.ampdoc.win).runtime){const t=this.ampdoc.getRootNode(),i=t.documentElement||t.body||t;this.unsubscribe(this.observe(i,this.setRootVisibility.bind(this)));const e=()=>{const t=as(i),e=this.bTt[t];e&&(this.ampdoc.win.innerHeight<1||this.ampdoc.win.innerWidth<1?e.isVisible=!1:e.isVisible=!0,this.setRootVisibility(e.isVisible?e.intersectionRatio:0))};this.ampdoc.win.addEventListener("resize",e),this.unsubscribe((()=>{this.ampdoc.win.removeEventListener("resize",e)}))}else this.setRootVisibility(this.ampdoc.isVisible()?1:0),this.unsubscribe(this.ampdoc.onVisibilityChanged((()=>{const t=this.ampdoc.isVisible();t||(this.RTt=!0),this.setRootVisibility(t?1:0)})))}dispose(){super.dispose(),this.Mv&&(this.Mv.disconnect(),this.Mv=null)}getStartTime(){return this.ampdoc.getFirstVisibleTime()}isBackgrounded(){return this.RTt}isBackgroundedAtStart(){return this.MTt}getRootMinOpacity(){const t=this.ampdoc.getRootNode();return es(t.documentElement||t.body||t)}getRootLayoutBox(){const t=this.ampdoc.getRootNode(),i=t.documentElement||t.body||t;return this.aa.getLayoutRect(i)}observe(t,i){const e=as(t);let s=this.bTt[e];return s?s.intersectionRatio>0&&s.isVisible&&i(s.intersectionRatio):(s={element:t,intersectionRatio:0,intersectionRect:null,isVisible:!1,boundingClientRect:null,listeners:[]},this.bTt[e]=s),s.listeners.push(i),this.yTt().observe(t),()=>{const s=this.bTt[e];if(s){const n=s.listeners.indexOf(i);-1!=n&&s.listeners.splice(n,1),0==s.listeners.length&&(this.Mv.unobserve(t),delete this.bTt[e])}}}getElementVisibility(t){if(0==this.getRootVisibility())return 0;const i=as(t),e=this.bTt[i];return e&&e.isVisible&&e.intersectionRatio||0}getElementIntersectionRect(t){if(this.getElementVisibility(t)<=0)return null;const i=as(t),e=this.bTt[i];return e?e.intersectionRect:null}yTt(){if(!this.Mv){const{win:t}=this.ampdoc;this.Mv=new t.IntersectionObserver(this.STt.bind(this),{threshold:us})}return this.Mv}STt(t){t.forEach((t=>{let i=t.intersectionRect;i=ts(Number(i.left),Number(i.top),Number(i.width),Number(i.height));let{boundingClientRect:e}=t;e=e&&ts(Number(e.left),Number(e.top),Number(e.width),Number(e.height)),this.wTt(t.target,t.intersectionRatio,i,e)}))}wTt(t,i,e,s){i=Math.min(Math.max(i,0),1);const n=as(t),r=this.bTt[n];let o=!0;if((s.width<1||s.height<1)&&(o=!1),r){r.isVisible=o,r.intersectionRatio=i,r.intersectionRect=e,r.boundingClientRect=s;for(let t=0;t<r.listeners.length;t++)r.listeners[t](r.isVisible?i:0)}}},_s=class extends fs{constructor(t,i){super(t,t.ampdoc),this.embed=i,this.MTt=this.parent.isBackgrounded(),this.unsubscribe(this.parent.observe(i.host,this.setRootVisibility.bind(this)))}getStartTime(){return this.embed.getStartTime()}isBackgrounded(){return this.parent.isBackgrounded()}isBackgroundedAtStart(){return this.MTt}getRootMinOpacity(){return es(this.embed.iframe)}getRootLayoutBox(){const t=this.embed.iframe;return It(this.ampdoc).getLayoutRect(t)}observe(t,i){return this.parent.observe(t,i)}getElementVisibility(t){return 0==this.getRootVisibility()?0:this.parent.getElementVisibility(t)}getElementIntersectionRect(t){return 0==this.getRootVisibility()?null:this.parent.getElementIntersectionRect(t)}},ms=["AMP-AD","AMP-ANALYTICS","AMP-PIXEL","AMP-AD-EXIT"],As=/^vars(.+)/,ps=class{constructor(t){this.ampdoc=t,this.cEt=d(),this.VTt=null,this.OTt=null}dispose(){for(const t in this.cEt)this.cEt[t].dispose(),delete this.cEt[t];this.VTt&&this.VTt.dispose(),this.OTt&&this.OTt.dispose()}getType(){}getRoot(){}getRootElement(){const t=this.getRoot();return t.host||t.documentElement||t.body||t}getHostElement(){}signals(){}contains(t){return this.getRoot().contains(t)}getElementById(t){}getTrackerForAllowlist(t,i){const e=i[t];return e?this.getTracker(t,e):null}getTracker(t,i){let e=this.cEt[t];return e||(e=new i(this),this.cEt[t]=e),e}getTrackerOptional(t){return this.cEt[t]||null}getElement(t,i,e=null){return":root"==i?(s=()=>this.getRootElement(),new Promise((t=>{t(s())}))):":host"==i?new Promise((t=>{t(G().assertElement(this.getHostElement(),`Element "${i}" not found`))})):this.ampdoc.whenReady().then((()=>{let s,n=null;try{s="scope"==e?function(t,i){return t.querySelector(g(i,":scope"))}(t,i):"closest"==e?I(t,i):this.getRoot().querySelector(i)}catch(t){J(!1,`Invalid query selector ${i}`)}return s&&this.contains(s)&&(n=s),G().assertElement(n,`Element "${i}" not found`)}));var s}NTt(t,i=!0){return this.ampdoc.whenReady().then((()=>{let e=[];for(let s=0;s<t.length;s++){let n,r=[];const o=t[s];try{n=this.getRoot().querySelectorAll(o)}catch(t){J(!1,`Invalid query selector ${o}`)}for(let t=0;t<n.length;t++)this.contains(n[t])&&r.push(n[t]);r=i?this.CTt(r,o):r,J(r.length,`Element "${o}" not found`),e=e.concat(r)}return e.filter(((t,i)=>e.indexOf(t)===i))}))}CTt(t,i){const e=[];for(let i=0;i<t.length;i++)Object.keys(M(t[i],void 0,As)).length&&e.push(t[i]);return e}getAmpElement(t,i,e){return this.getElement(t,i,e).then((t=>(this.kTt([t],i),t)))}getElements(t,i,e,s=!0){return o(i)?(J(!e,"Cannot have selectionMethod %s defined with an array selector.",e),this.NTt(i,s)):this.getElement(t,i,e).then((t=>[t]))}kTt(t,i){for(let e=0;e<t.length;e++)J(t[e].classList.contains("i-amphtml-element"),'Element "%s" is required to be an AMP element',i)}createSelectiveListener(t,i,e,s=null){return n=>{if(":host"==e)return;const r=this.getRootElement(),o="*"==e,h=":root"==e;let{target:u}=n;for(;u&&this.contains(u)&&("scope"!=s||h||i.contains(u));)if("closest"!=s||u.contains(i)){if(o||h&&u==r||Ts(u,e)){t(u,n);break}u=u.parentElement}else u=u.parentElement}}whenIniLoaded(){}getVisibilityManager(){return this.VTt||(this.VTt=ls(this.getRoot())),this.VTt}getScrollManager(){return this.OTt||(this.OTt=new class{constructor(t){this.aa=It(t.ampdoc),this.Od=Z(t.ampdoc,"mutator"),this.DTt=null,this.tu=new Pe,this.Bc=t.getRootElement(),this.LTt=null}dispose(){this.tu.removeAll(),this.xTt()}removeScrollHandler(t){this.tu.remove(t),this.tu.getHandlerCount()<=0&&this.xTt()}addScrollHandler(t){const i=this.aa.getSize();return this.UTt().then((e=>{const{height:s,left:n,top:r,width:o}=e,h={top:this.aa.getScrollTop()-r,left:this.aa.getScrollLeft()-n,width:i.width,height:i.height,scrollHeight:s,scrollWidth:o,initialSize:{scrollHeight:s,scrollWidth:o}};t(h)})),0===this.tu.getHandlerCount()&&this.HTt(),this.tu.add(t)}yx(t){return Promise.all([this.UTt(),this.jTt()]).then((i=>{const{height:e,width:s}=i[0],{height:n,left:r,top:o,width:h}=i[1],u={top:t.top-o,left:t.left-r,width:t.width,height:t.height,scrollWidth:h,scrollHeight:n,initialSize:{scrollHeight:e,scrollWidth:s}};this.tu.fire(u)}))}xTt(){this.DTt&&(this.DTt(),this.DTt=null)}HTt(){this.DTt=this.aa.onChanged(this.yx.bind(this))}UTt(){return K(this.LTt||this.jTt())}jTt(){const t=this.Od.measureElement((()=>this.aa.getLayoutRect(this.Bc)));return this.LTt=this.LTt||t,t}}(this)),this.OTt}},Ps=class extends ps{constructor(t){super(t)}getType(){return"ampdoc"}getRoot(){return this.ampdoc.getRootNode()}getHostElement(){return null}signals(){return this.ampdoc.signals()}getElementById(t){return this.ampdoc.getElementById(t)}whenIniLoaded(){const t=It(this.ampdoc);let i;if("inabox"==F(this.ampdoc.win).runtime)i=t.getLayoutRect(this.getRootElement());else{const e=t.getSize();i=ts(0,0,e.width,e.height)}return e=this.ampdoc,this.ampdoc.win,function(t,i){const e=dt(t);return e.signals().whenSignal("ready-scan").then((()=>{const t=(t=>Z(t,"resources"))(e).get().filter((t=>!ms.includes(t.element.tagName))).map((t=>t.element));return 0===t.length?Promise.resolve([]):new Promise((i=>{const{win:s}=e,n=new s.IntersectionObserver((t=>{n.disconnect();const e=[];for(let i=0;i<t.length;i++){const{isIntersecting:s,target:n}=t[i];s&&e.push(n)}i(e)}),{root:b(s)?s.document:null,threshold:.01});for(let i=0;i<Math.min(t.length,100);i++)n.observe(t[i])})).then((t=>Promise.all(t.map((t=>t.whenLoaded())))))}))}(e);var e}},Es=class extends ps{constructor(t,i){super(t),this.embed=i}getType(){return"embed"}getRoot(){return this.embed.win.document}getHostElement(){return this.embed.iframe}signals(){return this.embed.signals()}getElementById(t){return this.embed.win.document.getElementById(t)}whenIniLoaded(){return this.embed.whenIniLoaded()}};function Ts(t,i){try{return v(t,i)}catch(t){return G().error("amp-analytics/analytics-root","Bad query selector.",i,t),!1}}var gs="__AMP_AN_ROOT";function vs(t,i){return Is(t)===Is(i)}function Is(t){return t.replace(/^(?:www\.|m\.|amp\.)+/,"")}function Rs(t,i){const e=i.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*");return new RegExp("^"+e+"$").test(t)}var Ms={"AMPDOC_HOST":!0,"AMPDOC_HOSTNAME":!0,"AMPDOC_URL":!0,"AMP_VERSION":!0,"AVAILABLE_SCREEN_HEIGHT":!0,"AVAILABLE_SCREEN_WIDTH":!0,"BACKGROUND_STATE":!0,"BROWSER_LANGUAGE":!0,"CANONICAL_HOST":!0,"CANONICAL_HOSTNAME":!0,"CANONICAL_PATH":!0,"CANONICAL_URL":!0,"DOCUMENT_CHARSET":!0,"FIRST_CONTENTFUL_PAINT":!0,"FIRST_VIEWPORT_READY":!0,"MAKE_BODY_VISIBLE":!0,"RANDOM":!0,"SCREEN_COLOR_DEPTH":!0,"SCREEN_HEIGHT":!0,"SCREEN_WIDTH":!0,"SOURCE_HOST":!0,"SOURCE_HOSTNAME":!0,"SOURCE_PATH":!0,"SOURCE_URL":!0,"TIMESTAMP":!0,"TIMEZONE":!0,"TIMEZONE_CODE":!0,"USER_AGENT":!0,"VIEWPORT_HEIGHT":!0,"VIEWPORT_WIDTH":!0},bs="${extraUrlParams}",ys={"default":new class{generateRequest(t,i,e=!1){return e?{url:t.replace(bs,""),payload:JSON.stringify(i.extraUrlParams)}:{url:Ss(t,[i])}}generateBatchRequest(t,i,e=!1){return e?{url:t.replace(bs,""),payload:JSON.stringify(i.map((t=>t.extraUrlParams)))}:{url:Ss(t,i)}}}};function Ss(t,i){const e=i.map((t=>Xt(t.extraUrlParams))).filter(Boolean).join("&");let s;return s=t.indexOf(bs)>=0?t.replace(bs,e):Kt(t,e),s}var ws=class{constructor(t,i,e,s,n){this.ni=t,this.es=t.getAmpDoc(),this.win=this.es.win,this.FTt=i.origin,this.baseUrl=K(i.baseUrl),this.$Tt=i.batchInterval,this.qTt=Number(i.reportWindow)||null,this.BTt=null,this.ert=te(t),this.LR=Et(t),this.Sw=vt(t),this.WTt=null,this.GTt=null,this.zTt=[],this.YTt=e,this.vI=s,this.So=n?Ms:void 0,this.KTt=null,this.JTt=null,this.XTt=!0,this.ZTt=null,this.LB=0,this.yo=Date.now(),this.QTt(),this.tIt()}send(t,i,e){const s=!0===i.important;if(!this.XTt&&!s)return;this.LB++,this.ZTt=i;const n=this.ert.getMacros(this.ni);var r,o,u;if(n.RESOURCE_TIMING=(r=this.ni,o=i.resourceTimingSpec,u=this.yo,o&&Date.now()<u+6e4?function(t,i){const{win:e}=t.getAmpDoc();if(i.done||!e.performance||!e.performance.now||!e.performance.getEntriesByType||!f((s=i).resources)||!(s.encoding&&s.encoding.entry&&s.encoding.delim)||s.encoding.base<2||s.encoding.base>36||null!=s.responseAfter&&"number"!=typeof s.responseAfter)return i.done=!0,Promise.resolve("");var s;let n=function(t){return t.performance.getEntriesByType("resource")}(e);n.length>=150&&(i.done=!0);const r=i.responseAfter||0;return i.responseAfter=Math.max(r,e.performance.now()),n=n.filter((t=>t.startTime+t.duration>=r)),n.length?(o=()=>function(t,i,e){const s=i.resources,n=i.encoding,r=te(e),o=(t,i=0)=>Math.round(t-i).toString(n.base||10),u=function(t,i){const e=function(t){const i={};for(const e in t){const s=t[e].host||"",n=t[e].path||"",r=t[e].query||"",o={name:e,pathPattern:new RegExp(n),queryPattern:new RegExp(r)};i[s]?i[s].resources.push(o):i[s]={hostPattern:new RegExp(s),resources:[o]}}const e=[];for(const t in i)e.push(i[t]);return e}(i),s=[];return t.forEach((t=>{const i=function(t,i){const e=t.name;for(let t=0;t<i.length;++t){const{hostPattern:s,resources:n}=i[t];if(!s.test(e.host))continue;const r=h(n,(t=>t.pathPattern.test(e.pathname)&&t.queryPattern.test(e.search)));if(-1!=r)return n[r].name}return null}(t,e);i&&s.push({entry:t,name:i})})),s}(t,s).map((t=>{const{entry:i,name:e}=t;return function(t,i,e){const s={"key":i,"startTime":e(t.startTime),"redirectTime":e(t.redirectEnd,t.redirectStart),"domainLookupTime":e(t.domainLookupEnd,t.domainLookupStart),"tcpConnectTime":e(t.connectEnd,t.connectStart),"serverResponseTime":e(t.responseStart,t.requestStart),"networkTransferTime":e(t.responseEnd,t.responseStart),"transferSize":e(t.transferSize||0),"encodedBodySize":e(t.encodedBodySize||0),"decodedBodySize":e(t.decodedBodySize||0),"duration":e(t.duration),"initiatorType":t.initiatorType};return new Gi(s,1)}(i,e,o)})).map((t=>r.expandTemplate(n.entry,t,e)));return Promise.all(u).then((t=>t.join(n.delim)))}(n,i,t),new Promise((t=>{setTimeout((()=>t(o())))}))):Promise.resolve("");var o}(r,o):Promise.resolve("")),this.WTt||(e.freezeVar("extraUrlParams"),this.WTt=this.iIt(this.baseUrl,e,n)),!this.GTt&&this.FTt){const t=new Gi(e.vars,e.iterations,!0);this.GTt=this.iIt(this.FTt,t,n)}const c=Lt(Lt({},t),i.extraUrlParams),a=this.win.Date.now(),l=Vs(this.ert,this.LR,c,e,n,this.ni,this.So).then((t=>({"trigger":i.on,"timestamp":a,"extraUrlParams":t})));this.zTt.push(l),this.Ur(s||!this.$Tt)}dispose(){this.ar(),this.KTt&&(this.win.clearTimeout(this.KTt),this.KTt=null),this.JTt&&(this.win.clearTimeout(this.JTt),this.JTt=null)}iIt(t,i,e){return this.ert.expandTemplate(t,i,this.ni,e,this.So).then((t=>this.LR.expandUrlAsync(t,e,this.So).catch((i=>J(!1,`Could not expand URL "${t}": ${i.message}`)))))}Ur(t){0!=this.LB&&t&&this.eIt()}eIt(){const{WTt:t,zTt:i,GTt:e}=this,s=this.ZTt;this.ar(),(e||t).then((t=>{this.YTt.url(this.es,t,!0)})),Promise.all([t,Promise.all(i),e]).then((t=>{const i=this.sIt(t[0],t[2]),e=t[1];0!==e.length&&(s.iframePing?(J(s.on==De,"iframePing is only available on page view requests."),this.vI.sendRequestUsingIframe(i,e[0])):this.vI.sendRequest(i,e,!!this.$Tt))}))}ar(){this.LB=0,this.WTt=null,this.zTt=[],this.ZTt=null}tIt(){if(this.$Tt){this.$Tt=o(this.$Tt)?this.$Tt:[this.$Tt];for(let t=0;t<this.$Tt.length;t++){let i=this.$Tt[t];J(A(i),"Invalid batchInterval value: %s",this.$Tt),i=1e3*Number(i),J(i>=200,"Invalid batchInterval value: %s, interval value must be greater than %s ms.",this.$Tt,200),this.$Tt[t]=i}this.BTt=0,this.nIt()}}QTt(){this.qTt&&(this.JTt=this.win.setTimeout((()=>{this.Ur(!0),this.XTt=!1,this.KTt&&(this.win.clearTimeout(this.KTt),this.KTt=null)}),1e3*this.qTt))}nIt(){K(null!=this.BTt);const t=this.BTt<this.$Tt.length?this.$Tt[this.BTt++]:this.$Tt[this.$Tt.length-1];this.KTt=this.win.setTimeout((()=>{this.Ur(!0),this.nIt()}),t)}sIt(t,i){return i?this.Sw.parse(i).origin+t:t}};function Vs(t,i,e,s,n,r,h){const u={},c=[],a=new Gi(s.vars,s.iterations,!0),l=(e,s,u)=>{const d=e[s];if("string"==typeof d){u[s]=void 0;const e=t.expandTemplate(d,a,r).then((t=>i.expandStringAsync(t,n,h))).then((t=>{u[s]=t}));c.push(e)}else if(o(d)){u[s]=[];for(let t=0;t<d.length;t++)l(d,t,u[s])}else if(f(d)&&null!==d){u[s]={};const t=Object.keys(d);for(let i=0;i<t.length;i++)l(d,t[i],u[s])}else u[s]=d},d=Object.keys(e);for(let t=0;t<d.length;t++)l(e,d[t],u);return Promise.all(c).then((()=>u))}var Os=class{constructor(t,i){this.fdt=i,this.eY=!1,this.rIt=[],this.ygt=new class{constructor(t,i,e,s){this.hv=t,this.Sv=e,this.jv=[],this.Ev=function(t,i,e,s,n,r){K(t.src),K(!t.parentNode),K(e);const o=t.ownerDocument.defaultView;!function(t){t.listeningFors||t.addEventListener("message",(function(i){if(!yt(i))return;const e=function(t){return"string"==typeof t&&(t="{"==t.charAt(0)?E(t,(t=>{}))||null:hi(t)?function(t){if(!hi(t))return null;const i=t.indexOf("{");return p(-1!=i),E(t.substr(i),(i=>{V(new Error(`MESSAGING: Failed to parse message: ${t}\n${i.message}`))}))}(t):null),t}(yt(i));if(!e||!e.sentinel)return;const s=function(t,i,e,s){const n=mi(t,i);if(!n)return n;let r;for(let t=0;t<n.length;t++){const i=n[t],{contentWindow:e}=i.frame;if(e){if(s==e||Ai(e,s)){r=i;break}}else setTimeout(pi,0,n)}return r?r.events:null}(t,e.sentinel,i.origin,i.source);if(!s)return;let n=s[e.type];if(n){n=n.slice();for(let t=0;t<n.length;t++)(0,n[t])(e,i.source,i.origin,i)}}))}(o);const h=function(t,i,e){const s=mi(t,Pi(i,e),!0);let n;for(let t=0;t<s.length;t++){const e=s[t];if(e.frame===i){n=e;break}}return n||(n={frame:i,events:Object.create(null)},s.push(n)),n.events}(o,t,s),u=Yt(t.src).origin;let c,a=h[i]||(h[i]=[]),l=function(i,s,o,h){if("amp"==i.sentinel){if(s!=t.contentWindow)return;const i="null"==o&&r;if(u!=o&&!i)return}(n||s==t.contentWindow)&&(i.sentinel!=_i?e(i,s,o,h):c())};return a.push(l),c=function(){if(l){const t=a.indexOf(l);t>-1&&a.splice(t,1),l=null,a=null,e=null}}}(this.hv,i,((t,i,e)=>{this.jv.some((t=>t.win==i))||this.jv.push({win:i,origin:e}),s(t,i,e)}),this.Sv,this.Sv)}send(t,i){(function(t,i){const e=[];let s=0;for(let i=0;i<t.length;i++){const n=t[i];n.win.parent?(s<i&&(t[s]=n),s++):e.push(n)}s<t.length&&(t.length=s)})(this.jv),function(t,i,e,s,n){if(!t.contentWindow)return;s.type=e,s.sentinel=Pi(t,n);let r=s;n&&(r="amp-"+JSON.stringify(s));for(let t=0;t<i.length;t++){const e=i[t];e.win.postMessage(r,e.origin)}}(this.hv,this.jv,t,i,this.Sv)}destroy(){this.Ev(),this.jv.length=0}}(this.fdt,"send-iframe-transport-events",!0,(()=>{this.setIsReady()}))}isReady(){return this.eY}setIsReady(){this.eY=!0,this.oIt()}queueSize(){return this.rIt.length}enqueue(t){K(t&&t.creativeId&&t.message),this.rIt.push(t),this.queueSize()>=100&&this.rIt.shift(),this.oIt()}oIt(){this.isReady()&&this.queueSize()&&(this.ygt.send("iframe-transport-events",{events:this.rIt}),this.rIt=[])}},Ns=class{constructor(t,i,e,s){this.hIt=t,this.JI=i,this.uIt=s,K(e&&e.iframe),this.cIt=e.iframe,this.aIt=0,this.processCrossDomainIframe()}detach(){Ns.markCrossDomainIframeAsDone(this.hIt.document,this.JI)}processCrossDomainIframe(){let t;Ns.hasCrossDomainIframe(this.JI)?(t=Ns.getFrameData(this.JI),++t.usageCount):(t=this.createCrossDomainIframe(),this.hIt.document.body.appendChild(t.frame),this.Qp()),K(t)}createCrossDomainIframe(){const t=Ns.lIt(),i=JSON.stringify({scriptSrc:(this.hIt,D.thirdParty+"/2202072236000/iframe-transport-client-v0.js"),sentinel:t,type:this.JI}),e=R(this.hIt.document,"iframe",{sandbox:"allow-scripts allow-same-origin",name:i,"data-amp-3p-sentinel":t});e.sentinel=t,fi(e,!1),e.src=this.cIt;const s={frame:e,usageCount:1,queue:new Os(this.hIt,e)};return Ns.fIt[this.JI]=s,s}Qp(){var t;(t=this.hIt).PerformanceObserver&&t.TaskAttributionTiming&&"containerName"in t.TaskAttributionTiming.prototype&&(Ns.dIt[this.JI]=new this.hIt.PerformanceObserver((t=>{t&&t.getEntries().forEach((t=>{t&&"longtask"==t.entryType&&"cross-origin-descendant"==t.name&&t.attribution&&t.attribution.forEach((t=>{this.cIt==t.containerSrc&&++this.aIt%5==0&&G().error("amp-analytics/iframe-transport",`Long Task: Vendor: "${this.JI}"`)}))}))})),Ns.dIt[this.JI].observe({entryTypes:["longtask"]}))}static markCrossDomainIframeAsDone(t,i){const e=Ns.getFrameData(i);K(e&&e.frame&&e.usageCount),--e.usageCount||(t.body.removeChild(e.frame),delete Ns.fIt[i],Ns.dIt[i]&&(Ns.dIt[i].disconnect(),Ns.dIt[i]=null))}static hasCrossDomainIframe(t){return _(Ns.fIt,t)}static lIt(){return String(++Ns._It)}sendRequest(t){const i=Ns.getFrameData(this.JI);K(i),K(i.queue),i.queue.enqueue({creativeId:this.uIt,message:t})}static getFrameData(t){return Ns.fIt[t]}static resetCrossDomainIframes(){Ns.fIt={}}getCreativeId(){return this.uIt}getType(){return this.JI}};function Cs(t,i,e=!1){const s=new(vi.getImage(t));return e&&(s.referrerPolicy="no-referrer"),s.src=i,s}Ns.fIt={},Ns._It=0,Ns.dIt={};var ks,Ds="amp-analytics/transport",Ls=class{constructor(t,i={}){this.es=t,this.i=t.win,this.it=i,this.Lr=this.it.referrerPolicy,"no-referrer"===this.Lr&&(this.it.beacon=!1,this.it.xhrpost=!1),this.mIt=!!this.it.useBody,this.AIt=null,this.pIt="inabox"==F(this.i).runtime}sendRequest(t,i,e){if(!t||0===i.length)return;const s=this.PIt(),n=function(n){const r={};return n=>{const o=String(n);return void 0===r[o]&&(r[o]=function(n){const r=e?s.generateBatchRequest(t,i,n):s.generateRequest(t,i[0],n);return r.url.startsWith("amp-script:")||(Zt(r.url,"amp-analytics request"),function(t){J(!("__amp_source_origin"in U(Yt(t).search)),"Source origin is not allowed in %s",t)}(r.url)),r}(n)),r[o]}}();if(this.it.iframe)return this.AIt?void this.AIt.sendRequest(n(!1).url):void Y().error(Ds,"iframe transport was inadvertently deleted");if(this.it["amp-script"])return void Ls.forwardRequestToAmpScript(this.es,{url:t,payload:n(!0).payload});if(this.it.beacon&&Ls.sendRequestUsingBeacon(this.i,n(this.mIt)))return;if(this.it.xhrpost&&Ls.sendRequestUsingXhr(this.i,n(this.mIt)))return;const r=this.it.image;if(r){const t="object"==typeof r&&r.suppressWarnings;Ls.sendRequestUsingImage(this.i,n(!1),t,this.Lr)}}maybeInitIframeTransport(t){if(!this.it.iframe||this.AIt)return;const i=et(T(t)),e=t.getAttribute("type"),s=this.pIt?"1":G().assertString(function(t,i){try{const e=st(t,i).parentElement;if("AMP-AD"==e.nodeName)return String(e.getResourceId())}catch(t){}return null}(t,i),"No friendly amp-ad ancestor element was found for amp-analytics tag with iframe transport.");this.AIt=new Ns(i,e,this.it,s)}deleteIframeTransport(){this.AIt&&(this.AIt.detach(),this.AIt=null)}sendRequestUsingIframe(t,i){const e=Ss(t,[i]);if(!e)return void G().error(Ds,"Request not sent. Contents empty.");Zt(e,"amp-analytics request"),J(Yt(e).origin!=Yt(this.i.location.href).origin,"Origin of iframe request must not be equal to the document origin. See https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-iframe-origin-policy.md for details.");const s=this.i.document.createElement("iframe");fi(s,!1),s.onload=s.onerror=()=>{Pt(this.i).delay((()=>{var t,i;null===(i=(t=s).parentElement)||void 0===i||i.removeChild(t)}),5e3)},s.setAttribute("amp-analytics",""),s.setAttribute("sandbox","allow-scripts allow-same-origin"),s.src=e,this.i.document.body.appendChild(s)}PIt(){return ys.default}static sendRequestUsingImage(t,i,e,s){t&&function(t){let i,e;if(function(t){return!!(t.complete||"complete"==t.readyState||wt(t)&&t.readyState>0||t.document&&"complete"==t.document.readyState)}(t))return Promise.resolve(t);const s=wt(t);return s&&t.__AMP_MEDIA_LOAD_FAILURE_SRC===t.currentSrc?Promise.reject(t):new Promise(((n,r)=>{if(i=s?St(t,"loadedmetadata",n,{capture:!0}):St(t,"load",n),!t.tagName)return;let o=t;if(s&&!t.hasAttribute("src")&&(o=function(t,i){for(let e=t.lastElementChild;e;e=e.previousElementSibling)if(i(e))return e;return null}(t,(t=>"SOURCE"===t.tagName)),!o))return r(new Error("Media has no source."));e=St(o,"error",r)})).then((()=>(e&&e(),t)),(()=>{i&&i(),function(t){wt(t)&&(t.__AMP_MEDIA_LOAD_FAILURE_SRC=t.currentSrc||!0);let i=t;throw i&&i.src&&(i=i.src),G().createError("Failed to load:",i)}(t)}))}(function(t,i,e){return e&&"no-referrer"!==e&&G().error("pixel","Unsupported referrerPolicy: %s",e),"no-referrer"===e?function(t,i){if("referrerPolicy"in Image.prototype)return Cs(t,i,!0);{const e=R(t.document,"iframe",{"src":"about:blank","style":"display:none"});return e.onload=()=>{Cs(e.contentWindow,i)},t.document.body.appendChild(e),e}}(t,i):Cs(t,i)}(t,i.url,s)).then((()=>{})).catch((()=>{}))}static sendRequestUsingBeacon(t,i){const e=vi.getSendBeacon(t);return!!e&&e(i.url,i.payload||"")}static sendRequestUsingXhr(t,i){const e=vi.getXMLHttpRequest(t);if(!e)return!1;const s=new e;return"withCredentials"in s&&(s.open("POST",i.url,!0),s.withCredentials=!0,s.setRequestHeader("Content-Type","text/plain"),s.onreadystatechange=()=>{s.readyState},s.send(i.payload||""),!0)}static forwardRequestToAmpScript(t,i){return _t(t).then((t=>{J(t,"AMP-SCRIPT is not installed"),t.fetch(i.url,JSON.parse(i.payload))}))}},xs="amp-analytics",Us=[De,Se,we,Ve],Hs=class extends t.BaseElement{constructor(t){super(t),this.EIt=n(),this.TIt=null,this.gIt=!1,this.Nk={},this.CL={},this.vIt=null,this.IIt=null,this.ert=null,this.RIt=mt(this.win),this.MIt=null,this.vI=null,this.JI=this.element.getAttribute("type"),this.pIt="inabox"==F(this.win).runtime,this.bIt=null,this.yIt=null,this.SIt=null}getLayoutPriority(){return this.pIt?0:1}isAlwaysFixed(){return!Ti(this.element)}isLayoutSupported(t){return!0}buildCallback(){this.gIt=this.element.hasAttribute("sandbox"),this.element.setAttribute("aria-hidden","true"),this.TIt=this.element.getAttribute("data-consent-notification-id"),null!=this.TIt&&(this.EIt=Tt(this.element).then((t=>t.get(this.TIt)))),"immediate"==this.element.getAttribute("trigger")&&this.wIt()}layoutCallback(){return this.wIt()}detachedCallback(){this.IIt&&(this.IIt.dispose(),this.IIt=null),this.bIt&&(this.bIt.dispose(),this.bIt=null);for(const t in this.Nk)this.Nk[t].dispose(),delete this.Nk[t]}resumeCallback(){this.MIt&&this.MIt.then((()=>{this.vI.maybeInitIframeTransport(this.element)}))}unlayoutCallback(){return!this.getAmpDoc().isVisible()&&(this.MIt&&this.MIt.then((()=>{this.vI.deleteIframeTransport()})),super.unlayoutCallback())}wIt(){if(this.MIt)return this.MIt;const t=this.getAmpDoc();return this.MIt=t.whenFirstVisible().then((()=>Pt(this.win).promise(1))).then((()=>this.EIt)).then((()=>{return Promise.all([(i=t,tt(i,"amp-analytics-instrumentation")),ie(t)]);var i})).then((t=>{this.vIt=t[0],this.ert=t[1];const i=new r,e=()=>{const t=new class{constructor(t){this.ni=t,this.i=null,this.VIt=Ut||{},this.mAt={},this.CL={},this.OIt={},this.gIt=!1,this.ert=te(t)}loadConfig(){return this.i=this.ni.ownerDocument.defaultView,this.gIt=this.ni.hasAttribute("sandbox"),Promise.all([this.NIt(),this.CIt()]).then(this.kIt.bind(this)).then(this.DIt.bind(this)).then((()=>this.CL))}LIt(t){const i=(this.i.location,D.cdn),e="bg"===t&&null!==(s=self.AMP_CONFIG)&&void 0!==s&&s.canary?".canary":"";var s;return`${i}/rtv/${F().rtvVersion}/v0/analytics-vendors/${t}${e}.json`}CIt(){const t=this.ni.getAttribute("type");if(!t)return n();const i=this.LIt(t),e=this.ys();return Rt(this.i).fetchJson(i,{ampCors:!1}).then((t=>t.json())).then((t=>{this.mAt=t||{}}),(t=>{G().error(e,"Error loading vendor config: ",i,t)}))}NIt(){let t=this.ni.getAttribute("config");if(!t||this.gIt)return n();Zt(t,this.ni);const i=this.ys(),e={};return this.ni.hasAttribute("data-credentials")&&(e.credentials=this.ni.getAttribute("data-credentials")),Et(this.ni).expandUrlAsync(t,this.ert.getMacros(this.ni)).then((i=>(t=i,Rt(this.i).fetchJson(t,e)))).then((t=>t.json())).then((t=>{this.OIt=t}),(e=>{G().error(i,"Error loading remote config: ",t,e)}))}kIt(){const t=this.xIt().url,i={},e=this.vW();return this.UIt(e),re(e,i),re(this.OIt,i),!t||this.gIt?(this.CL=this.HIt(i),n()):this.jIt(i,t)}jIt(t,i){Zt(i,this.ni);const e=this.ys();return this.FIt(t).then((()=>{const s={method:"POST",body:t};return this.ni.hasAttribute("data-credentials")&&(s.credentials=this.ni.getAttribute("data-credentials")),Et(this.ni).expandUrlAsync(i).then((t=>Rt(this.i).fetchJson(t,s))).then((t=>t.json())).then((t=>{this.CL=this.HIt(t)}),(t=>{G().error(e,"Error rewriting configuration: ",i,t)}))}))}DIt(){this.CL.warningMessage&&(this.ys(),this.ni.getAttribute("type"),this.ni.getAttribute("config"),delete this.CL.warningMessage)}FIt(t){const i=t.configRewriter,e=i&&i.varGroups,s=this.xIt().varGroups;if(!e&&!s)return n();if(e&&!s)return this.ys(),n();t.configRewriter=t.configRewriter||{};const r=t.configRewriter;r.vars={};const o=[],h=e||{};return m(h,s),Object.keys(h).forEach((t=>{const i=h[t];if(!i.enabled)return;const e=this.shallowExpandObject(this.ni,i).then((t=>{delete t.enabled,Object.assign(r.vars,t)}));o.push(e)})),Promise.all(o).then((()=>{if(!Object.keys(r.vars).length)return delete t.configRewriter;e&&delete r.varGroups}))}HIt(t){const i={"vars":{"requestCount":0}};return re(oe(this.VIt),i),re(oe(this.mAt),i,!0),re(oe(t),i,!0),i}xIt(){return this.mAt.configRewriter||{}}vW(){if(this.ni.CONFIG)return this.ni.CONFIG;let t={};const i=this.ys();try{const{children:e}=this.ni;1==e.length?t=function(t){const i=(s=t,p(/^[\w-]+$/.test("script")),"> script",s.querySelectorAll(g("> script",":scope"))),{length:e}=i;var s;if(1!==e)throw new Error(`Found ${e} <script> children. Expected 1.`);const n=i[0];if(!function(t){var i;return"SCRIPT"==t.tagName&&"APPLICATION/JSON"==(null===(i=t.getAttribute("type"))||void 0===i?void 0:i.toUpperCase())}(n))throw new Error('<script> child must have type="application/json"');try{var r;return P(null!==(r=n.textContent)&&void 0!==r?r:"")}catch(t){throw new Error("Failed to parse <script> contents. Is it valid JSON?")}}(this.ni):e.length>1&&G().error(i,"The tag should contain only one <script> child.")}catch(t){G().error(i,t.message)}return t}UIt(t){if(this.ni.getAttribute("type")&&(t.transport||this.OIt.transport)){const t=this.ys();G().error(t,"Inline or remote config should not overwrite vendor transport settings")}t.transport&&t.transport.iframe&&(G().error(ne,"Inline configs are not allowed to specify transport iframe"),t.transport.iframe=void 0),this.OIt.transport&&this.OIt.transport.iframe&&(G().error(ne,"Remote configs are not allowed to specify transport iframe"),this.OIt.transport.iframe=void 0)}ys(){return"AmpAnalytics "+(this.ni.getAttribute("id")||"<unknown id>")}shallowExpandObject(t,i){const e={},s=[],n=[],r=Et(t),o=te(t).getMacros(t);return Object.keys(i).forEach((t=>{s.push(t);const e=r.expandStringAsync(i[t],o);n.push(e)})),Promise.all(n).then((t=>(s.forEach(((i,s)=>e[i]=t[s])),e)))}}(this.element).loadConfig();i.resolve(t)};return this.pIt?e():le(this.element,e,20),i.promise})).then((t=>(this.CL=t,new class{constructor(t,i,e){this.i=t,this.ni=i,this.LR=Et(i),this.$It=null,this.CL=e,this.Ro=te(i).getMacros(i)}write(){if(!this.$It){this.$It=new r;const t=()=>{this.$It.resolve(this.zc())};le(this.ni,t,10)}return this.$It.promise}zc(){if(!gi(this.i,this.ni))return n();if(!_(this.CL,"cookies"))return n();if(!f(this.CL.cookies))return G().error(Ae,"cookies config must be an object"),n();const t=this.CL.cookies;if(!1===t.enabled)return n();const i=this.SW(t),e=Object.keys(t),s=[];for(let n=0;n<e.length;n++){const r=e[n],o=t[r],h=this.qIt(o.sameSite||o.SameSite||t.sameSite||t.SameSite);this.VW(r,o)&&s.push(this.OW(r,o.value,i,h))}return Promise.all(s)}SW(t){if(!_(t,"cookieMaxAge"))return he;const i=Number(t.cookieMaxAge);return i||0===i?1e3*i:(G().error(Ae,"invalid cookieMaxAge %s, falling back to default value (1 year)",t.cookieMaxAge),he)}VW(t,i){return!(pe[t]||(f(i)?!_(i,"value")&&(G().error(Ae,"value is required in the cookieValue object"),1):(G().error(Ae,"cookieValue must be configured in an object"),1)))}OW(t,i,e,s){return this.LR.expandStringAsync(i,this.Ro).then((i=>{if(i){const n=Date.now()+e,r=s===si;!function(t,i,e,s,n={}){let r;!function(t,i,e){if(i.allowOnProxyOrigin)return void J(!i.highestAvailableDomain,"Could not support highestAvailable Domain on proxy origin, specify domain explicitly");J(!Qt(t.location.href),`Should never attempt to set cookie on proxy origin: ${e}`);const s=Yt(t.location.href).hostname.toLowerCase(),n=Yt(D.cdn).hostname.toLowerCase();J(!(s==n||u(s,"."+n)),"Should never attempt to set cookie on proxy origin. (in depth check): "+e)}(t,n,i),n.domain?r=n.domain:n.highestAvailableDomain&&(r=ri(t)),oi(t,i,e,s,r,n.sameSite,n.secure)}(this.i,t,i,n,{highestAvailableDomain:!0,sameSite:s,secure:r})}})).catch((t=>{G().error(Ae,"Error expanding cookie string",t)}))}qIt(t){switch(t){case"Strict":return"Strict";case"Lax":return"Lax";case"None":return si;default:return}}}(this.win,this.element,this.CL).write()))).then((()=>{this.vI=new Ls(this.getAmpDoc(),this.CL.transport||{})})).then(this.BIt.bind(this)).then(this.WIt.bind(this)).then(this.GIt.bind(this)),this.MIt.then((()=>{this.collapse()})),this.MIt}zIt(){return!!this.pIt||(null==this.SIt&&(this.SIt=Ti(this.element)),this.SIt)}BIt(){return this.CL.triggers&&Object.values(this.CL.triggers).some((t=>{var i;return null==t||null===(i=t.session)||void 0===i?void 0:i.persistEvent}))&&this.JI?Fi(this.getAmpDoc()).then((t=>{this.yIt=t})):n()}WIt(){if(this.YIt())return this.ys(),n();if(this.KIt(),!this.CL.triggers){const t=this.ys();return this.user().warn(t,"No triggers were found in the config. No analytics data will be sent."),n()}this.JIt(this.CL.extraUrlParams,this.CL.extraUrlParamsReplaceMap),this.IIt=this.vIt.createAnalyticsGroup(this.element),this.vI.maybeInitIframeTransport(this.element);const t=[];for(const e in this.CL.triggers)if(_(this.CL.triggers,e)){const s=this.CL.triggers[e],n=this.XIt({},s,void 0,!0),r=this.ys();if(!s){this.user().error(r,"Trigger should be an object: ",e);continue}const h=s.request||s.parentPostMessage&&this.zIt();if(!s.on||!h){const t=this.zIt()?'/"parentPostMessage"':"";this.user().error(r,'"on" and "request"'+t+" attributes are required for data to be collected.");continue}if(this.gIt){const t=s.on;if(!("click"!==(i=t)&&"browser-event"!==i&&"custom"!==i&&"hidden"!==i&&"ini-load"!==i&&"render-start"!==i&&"scroll"!==i&&"story"!==i&&"timer"!==i&&"video"!==i&&"visible"!==i||Us.includes(t))){this.user().error(r,t+" is not supported for amp-analytics in scope");continue}}this.JIt(s.extraUrlParams,this.CL.extraUrlParamsReplaceMap),t.push(this.ZIt(s).then((t=>{if(t){if(this.gIt){if(!this.element.parentElement)return;return s.selector=this.element.parentElement.tagName,s.selectionMethod="closest",this.QIt(s)}return s.selector&&!o(s.selector)?this.ert.expandTemplate(s.selector,n,this.element).then((t=>(s.selector=t,this.QIt(s)))):this.QIt(s)}})))}var i;return Promise.all(t)}preload(t,i){pt(this.win).preload(this.getAmpDoc(),t,i)}QIt(t){if(!this.IIt)return n();try{return this.IIt.addTrigger(t,this.pw.bind(this,t))}catch(i){return V(this.ys(),'Failed to process trigger "'+t.on+'"',i),n()}}JIt(t,i){if(t&&i){let e=0;for(const s in i){if(++e>16){const t=this.ys();this.user().error(t,"More than 16 extraUrlParamsReplaceMap rules aren't allowed; Skipping the rest");break}for(const e in t){const n=e.replace(s,i[s]);if(e!=n){const i=t[e];delete t[e],t[n]=i}}}}}YIt(){const t=this.CL.optoutElementId;if(t&&this.win.document.getElementById(t))return!0;if(!this.CL.optout)return!1;const i=this.CL.optout.split(".");let e=this.win;for(let t=0;t<i.length;t++){if(!e)return!1;e=e[i[t]]}return e()}KIt(){if(this.CL.requests){if(this.CL.requests){for(const t in this.CL.requests)_(this.CL.requests,t)&&(this.CL.requests[t].baseUrl||(this.user().error(xs,"request must have a baseUrl"),delete this.CL.requests[t]));for(const t in this.CL.requests)this.CL.requests[t].baseUrl=c(this.CL.requests[t].baseUrl,(t=>{const i=this.CL.requests[t];return i&&i.baseUrl||"${"+t+"}"}),5);const t={};for(const i in this.CL.requests)if(_(this.CL.requests,i)){const e=this.CL.requests[i];t[i]=new ws(this.element,e,pt(this.win),this.vI,this.gIt)}this.Nk=t}}else if(!this.zIt()){const t=this.ys();this.user().warn(t,"No request strings defined. Analytics data will not be sent from this page.")}}GIt(){this.bIt=new class{constructor(t,i,e,s){this.es=t,this.CL=i.linkers,this.Zk=i.vars||{},this.JI=e,this.ni=s,this.tRt={},this.Sw=vt(this.ni),this.aG=tt(t,"form-submit-service"),this.iRt=null,this.ert=te(this.es),this.eRt=null}init(){if(!f(this.CL))return n();this.eRt=ri(this.es.win),this.CL=this.sRt(this.CL);const t=Object.keys(this.CL).map((t=>{const i=this.CL[t].ids,e=Object.keys(i),s=e.map((t=>{const e=new Gi(this.Zk,void 0,!0);return this.nRt(i[t],e)}));return Promise.all(s).then((i=>{const s={};return i.forEach(((t,i)=>{t&&(s[e[i]]=t)})),this.tRt[t]=s,s}))}));if(t.length){const t=Z(this.es,"navigation");t.registerAnchorMutator(((t,i)=>{t.href&&"click"===i.type&&(t.href=this.rRt(t.href))}),2),t.registerNavigateToMutator((t=>this.rRt(t)),2)}return this.oRt(),Promise.all(t)}dispose(){this.iRt&&this.iRt()}sRt(t){const i={},e={enabled:this.hRt()&&this.uRt()},s=Object.keys(t).filter((i=>{const s=t[i],n=f(s);return n||(e[i]=s),n})),n=vi.getLocation(this.es.win),r=this.Sw.isProxyOrigin(n);return s.forEach((s=>{const n=Lt(Lt({},e),t[s]);!0===n.enabled&&(r||!1===n.proxyOnly)&&(n.ids?i[s]=n:G().error("amp-analytics/linker-manager",'"ids" is a required field for use of "linkers".'))})),i}nRt(t,i){const e=this.ert.getMacros(this.ni);return this.ert.expandTemplate(t,i,this.ni).then((t=>Et(this.ni).expandUrlAsync(t,e)))}hRt(){return"googleanalytics"===this.JI&&"googleanalytics"===this.es.getMetaByName("amp-google-client-id-api")&&this.es.registerSingleton(2)}uRt(){const t=X(this.es.win,"platform");return t.isSafari()&&t.getMajorVersion()>=12}rRt(t){const i=this.CL;for(const e in i)this.tRt[e]&&(t=this.cRt(t,e,i[e]));return t}cRt(t,i,e){const s=this.Sw.parse(t);if(this.aRt(s,i,e)&&this.lRt(s)){const e=yi("1",this.tRt[i]);if(e){const s={};return s[i]=e,function(t,i){const e=U(Yt(t).search),s={},n=Object.keys(i);for(let t=0;t<n.length;t++)_(e,n[t])||(s[n[t]]=i[n[t]]);return function(t,i){return Kt(t,Xt(i))}(t,s)}(t,s)}}return t}aRt(t,i,e){const s=e.destinationDomains,{hostname:n}=t,r=vi.getHostname(this.es.win),o=e.sameDomainEnabled;if(!Boolean(o)&&r===n)return!1;if(s&&!Array.isArray(s))return!1;if(s)return this.fRt(s,n);const{canonicalUrl:h,sourceUrl:u}=Z(this.es,"documentInfo").get(),c=vs(this.Sw.parse(h).hostname,n);if(this.eRt){const t=[this.eRt,"*"+this.eRt];return this.fRt(t,n)||c}return vs(this.Sw.parse(u).hostname,n)||c}lRt(t){return"https:"===t.protocol||"http:"===t.protocol}fRt(t,i){for(let e=0;e<t.length;e++){const s=t[e];if(s===i)return!0;if(-1!==s.indexOf("*")&&Rs(i,s))return!0}return!1}oRt(){this.iRt||this.aG.then((t=>{this.iRt=t.beforeSubmit(this.dRt.bind(this))}))}dRt(t){const{actionXhrMutator:i,form:e}=t;for(const t in this.CL){const s=this.CL[t],n=e.getAttribute("action-xhr")||e.getAttribute("action"),r=this.Sw.parse(n);this.aRt(r,t,s)&&this._Rt(e,i,t)}}_Rt(t,i,e){const s=this.tRt[e];if(!s)return;const n=yi("1",s),r=t.getAttribute("action-xhr");if(r)return i(Kt(r,Jt(e,n),void 0));this.mRt(t,e,n)}mRt(t,i,e){const s={"type":"hidden","name":i,"value":e},n=R(t.ownerDocument,"input",s);t.appendChild(n)}}(this.getAmpDoc(),this.CL,this.JI,this.element);const t=()=>{this.bIt.init()};this.pIt?t():le(this.element,t,10)}pw(t,i){var e,s;null===(e=t.session)||void 0===e||!e.persistEvent||null===(s=this.yIt)||void 0===s||s.updateEvent(this.JI);const n=o(t.request)?t.request:[t.request];for(let e=0;e<n.length;e++){const s=n[e];this.ARt(s,t,i)}}ARt(t,i,e){this.element.ownerDocument.defaultView||this.ys();const s=this.Nk[t],n=this.zIt()&&i.parentPostMessage;if(null!=t&&!s){const t=this.ys();if(this.user().error(t,"Ignoring request for event. Request string not found: ",i.request),!n)return}this.pRt(i,e).then((t=>{const n=this.element.ownerDocument&&this.element.ownerDocument.defaultView;t&&n&&(this.PRt(s,i,e),i.parentPostMessage&&this.zIt()&&b(this.win)&&this.ERt(i,e))}))}PRt(t,i,e){if(!t)return;this.CL.vars.requestCount++;const s=this.XIt(e,i);t.send(this.CL.extraUrlParams,i,s)}ERt(t,i){const e=t.parentPostMessage,s=this.XIt(i,t);(function(t,i,e,s,n,r){const o=te(t),h=Et(r),u=o.getMacros(r);n.freezeVar("extraUrlParams");const c=o.expandTemplate(i,n,r).then((t=>h.expandStringAsync(t,u)));return i.indexOf("${extraUrlParams}")<0?c:c.then((t=>{const i=Lt(Lt({},e),s.extraUrlParams);return Vs(o,h,i,n,u,r).then((i=>Ss(t,[{"extraUrlParams":i}])))}))})(this.getAmpDoc(),e,this.CL.extraUrlParams,t,s,this.element).then((t=>{this.win.parent.postMessage(t,"*")}))}ZIt(t){const i=t.sampleSpec,e=this.ys();if(!i)return Promise.resolve(!0);const s=i.sampleOn;if(!s)return this.user().error(e,"Invalid sampleOn value."),Promise.resolve(!0);const n=parseFloat(i.threshold);if(n>=0&&n<=100){const i=new r,e=()=>{const e=this.XIt({},t),r=this.nRt(s,e).then((t=>this.RIt.uniform(t))).then((t=>100*t<n));i.resolve(r)};return this.pIt?e():le(this.element,e,10),i.promise}return G().error(e,"Invalid threshold for sampling."),Promise.resolve(!0)}pRt(t,i){const e=this.XIt(i,t),s=this.TRt(this.CL.enabled,e),n=this.TRt(t.enabled,e);return Promise.all([s,n]).then((t=>(K(2===t.length),t[0]&&t[1])))}TRt(t,i){return void 0===t?Promise.resolve(!0):"boolean"==typeof t?Promise.resolve(t):this.nRt(t,i).then((t=>se(t)))}nRt(t,i){return this.ert.expandTemplate(t,i,this.element).then((t=>Et(this.element).expandUrlAsync(t,this.ert.getMacros(this.element))))}ys(){return"AmpAnalytics "+(this.element.getAttribute("id")||"<unknown id>")}XIt(t,i,e,s){const n={};return re(this.CL.vars,n),re(i.vars,n),re(t.vars,n),new Gi(n,e,s)}};t.registerServiceForDoc("amp-analytics-instrumentation",class{constructor(t){this.ampdoc=t,this.Bc=this.gRt(t.getRootNode())}dispose(){this.Bc.dispose()}getAnalyticsRoot(t){return this.gRt(t)}createAnalyticsGroup(t){const i=this.gRt(t);return new class{constructor(t,i){this.Bc=t,this.vRt=i,this.te=[],this.IRt=0,this.i=T(i)}dispose(){this.te.forEach((t=>{t()}))}addTrigger(t,i){const e=t.on,s=He(e),n=je(this.Bc.getType()),o=this.Bc.getTrackerForAllowlist(s,n);let h;J(!!o,'Trigger type "%s" is not allowed in the %s',e,this.Bc.getType());const u=new r,c=()=>{h=o.add(this.vRt,e,t,i),this.te.push(h),u.resolve()};if(this.IRt<1||"inabox"==F(this.i).runtime)c();else{const t=this.IRt<3?20:10;le(this.vRt,c,t)}return this.IRt++,u.promise}}(i,t)}RRt(t){return t===Ne?We:Be}triggerEventForTarget(t,i,e={},s=!0){const n=new Fe(t,i,e,s),r=this.gRt(t),o=He(i);r.getTracker(o,this.RRt(o)).trigger(n)}gRt(t){const i=dt(t),e=st(t),s=e&&Ei(e);return i==this.ampdoc&&!s&&this.Bc?this.Bc:this.MRt(s||i,(()=>s?new Es(i,s):new Ps(i)))}MRt(t,i){let e=t[gs];return e||(e=i(),t[gs]=e),e}}),t.registerServiceForDoc("activity",class{constructor(t){this.ampdoc=t,this.bRt=this.yRt.bind(this),this.SRt=this.wRt.bind(this),this.VRt=this.ORt.bind(this),this.NRt=this.CRt.bind(this),this.kRt={},this.DRt=[],this.LRt=!1,this.xRt=!1,this.URt=new class{constructor(){this.HRt=0,this.jRt=void 0}push(t){this.jRt&&this.jRt.time<t.time&&(this.HRt+=Ot(this.jRt,t.time)),this.jRt=t}getTotalEngagedTime(t){let i=0;return void 0!==this.jRt&&(i=this.HRt+Ot(this.jRt,t)),i}},this.aa=It(this.ampdoc),this.ampdoc.whenFirstVisible().then(this.Kh.bind(this))}Kh(){this.yo=Date.now(),this.wRt(),this.FRt()}$Rt(){const t=Date.now()-this.yo;return t>0?t:0}yRt(){this.LRt=!1,this.xRt=!1}FRt(){this.qRt(this.ampdoc.getRootNode(),Nt,this.SRt),this.qRt(this.ampdoc.getRootNode(),Ct,this.VRt),this.DRt.push(this.ampdoc.onVisibilityChanged(this.NRt)),this.aa.onScroll(this.SRt)}qRt(t,i,e){for(let s=0;s<i.length;s++)this.DRt.push(bt(t,i[s],e))}wRt(){this.LRt||(this.LRt=!0,this.xRt=!1,this.BRt(Vt))}ORt(){this.xRt||(this.xRt=!0,this.LRt=!1,this.BRt("inactive"))}BRt(t){const i=this.$Rt(),e=Math.floor(i/1e3),s=1e3-i%1e3;setTimeout(this.bRt,s),this.URt.push({type:t,time:e})}CRt(){this.ampdoc.isVisible()?this.wRt():this.ORt()}Ev(){for(let t=0;t<this.DRt.length;t++){const i=this.DRt[t];"function"==typeof i&&i()}this.DRt=[]}Vn(){this.Ev()}getTotalEngagedTime(){const t=Math.floor(this.$Rt()/1e3);return this.URt.getTotalEngagedTime(t)}getIncrementalEngagedTime(t,i=!0){if(!_(this.kRt,t))return i&&(this.kRt[t]=this.getTotalEngagedTime()),this.getTotalEngagedTime();const e=this.kRt[t];return!1===i?this.getTotalEngagedTime()-e:(this.kRt[t]=this.getTotalEngagedTime(),this.kRt[t]-e)}}),ht(ks=et(ks=t.win),ks,"amp-analytics-linker-reader",class{constructor(t){this.i=t,this.wW={}}get(t,i){return t&&i?(_(this.wW,t)||(this.wW[t]=this.WRt(t)),this.wW[t]&&this.wW[t][i]?this.wW[t][i]:null):(G().error("amp-analytics/linker-reader","LINKER_PARAM requires two params, name and id"),null)}WRt(t){const i=U(this.i.location.search);if(!_(i,t))return null;const e=i[t];return this.GRt(this.i.location,t),function(t){const i=function(t){const i=t.split(Ri),e=i.length%2==0;if(i.length<4||!e)return G().error(bi,`Invalid linker_param value ${t}`),null;const s=Number(i.shift());return 1!==s?(G().error(bi,`Invalid version number ${s}`),null):{checksum:i.shift(),serializedIds:i.join(Ri)}}(t);if(!i)return null;const{checksum:e,serializedIds:s}=i;return function(t,i){for(let e=0;e<=1;e++)if(Si(t,e)==i)return!0;return!1}(s,e)?function(t){const i={},e=t.split(Ri);for(let t=0;t<e.length;t+=2){const s=e[t];if(!Mi.test(s)){G().error(bi,`Invalid linker key ${s}, value ignored`);continue}const n=wi(e[t+1]);i[s]=n}return i}(s):(G().error(bi,"LINKER_PARAM value checksum not valid"),null)}(e)}GRt(t,i){if(!this.i.history.replaceState)return;const e=ti(t.search,i),s=t.origin+t.pathname+e+(t.hash||"");this.i.history.replaceState(null,"",s)}}),t.registerServiceForDoc("amp-analytics-session",class{constructor(t){this.YB=tt(t,"storage"),this.zRt=d(),this.es=t,this.i=t.win,this.R_=[],this.YRt=null,this.ws=null,this.KRt=!0,this.zc()}zc(){this.JRt(),this.R_.push(bt(this.i,"focus",(()=>{this.YRt=!0,this.XRt()})),bt(this.i,"blur",(()=>{this.YRt=!1,this.XRt()})),bt(this.i,"pageshow",(()=>{this.KRt=!0,this.XRt()})),bt(this.i,"pagehide",(()=>{this.KRt=!1,this.XRt()})),this.es.onVisibilityChanged((()=>{this.ws=this.es.isVisible(),this.XRt()})))}JRt(){this.YRt=this.i.document.hasFocus(),this.ws=!(function(t){const i=t[ai(t,"visibilityState",!0)];if(i)return i;const e=ai(t,"hidden",!0);return e in t&&t[e]?"hidden":Vi}(this.i.document)!=Vi)}XRt(){Object.keys(this.zRt).forEach((t=>{const i=this.zRt[t];i.engaged=this.ZRt(),this.QRt(t,i)}))}dispose(){this.R_.forEach((t=>{t()})),this.R_.length=0}getSessionValue(t,i){return this.get(t).then((t=>null==t?void 0:t[i]))}updateEvent(t){return this.get(t,(t=>{t.eventTimestamp=Date.now()}))}get(t,i){return t?_(this.zRt,t)&&!Ui(this.zRt[t])?(this.zRt[t]=this.tMt(this.zRt[t]),null==i||i(this.zRt[t]),this.QRt(t,this.zRt[t]),Promise.resolve(this.zRt[t])):this.iMt(t,i):(G().error(Oi,"Sessions can only be accessed with a vendor type."),Promise.resolve(null))}iMt(t,i){return this.YB.then((i=>{const e=Hi(t);return i.get(e)})).then((t=>{return t?this.tMt(f(i=t)?{[Ni]:i.sessionId,[Ci]:i.creationTimestamp,[xi]:i.count,[ki]:i.accessTimestamp,[Li]:i.eventTimestamp,[Di]:null===(e=i.engaged)||void 0===e||e}:(Y().error(Oi,"Invalid stored session value"),ji()),!0):ji(this.ZRt());var i,e})).then((e=>(t in this.zRt&&!Ui(this.zRt[t])||(null==i||i(e),this.QRt(t,e),this.zRt[t]=e),this.zRt[t])))}tMt(t,i){const e=t.count,s=Date.now();if(Ui(t)){const i=(null!=e?e:0)+1;t=ji(this.ZRt(),i)}else{const e=i&&t.engaged;t.engaged=e||this.ZRt(),e&&(this.YRt=!0,this.KRt=!0,this.ws=!0)}return t.accessTimestamp=s,t}ZRt(){return this.KRt&&this.ws&&this.YRt}QRt(t,i){return this.YB.then((e=>{const s=Hi(t);e.setNonBoolean(s,i)}))}}),t.registerServiceForDoc("amp-analytics-variables",class{constructor(t){this.es=t,this.f5={},this.MW=X(this.es.win,"amp-analytics-linker-reader"),this.eMt=Fi(this.es),this.sx("$DEFAULT",Yi),this.sx("$SUBSTR",zi),this.sx("$TRIM",(t=>t.trim())),this.sx("$TOLOWERCASE",(t=>t.toLowerCase())),this.sx("$TOUPPERCASE",(t=>t.toUpperCase())),this.sx("$NOT",(t=>String(!t))),this.sx("$BASE64",(t=>Bt(t))),this.sx("$HASH",this.sMt.bind(this)),this.sx("$IF",((t,i,e)=>se(t)?i:e)),this.sx("$REPLACE",Ki),this.sx("$MATCH",Ji),this.sx("$CALC",Xi),this.sx("$EQUALS",((t,i)=>t===i)),this.sx("LINKER_PARAM",((t,i)=>this.MW.get(t,i))),this.sx("TIMEZONE_CODE",(()=>{let t="";return"Intl"in this.es.win&&"DateTimeFormat"in this.es.win.Intl&&(t=(new this.es.win.Intl.DateTimeFormat).resolvedOptions().timeZone),t})),this.sx("SCROLL_TOP",(()=>Math.round(It(this.es).getScrollTop()))),this.sx("SCROLL_LEFT",(()=>Math.round(It(this.es).getScrollLeft()))),this.sx("EXPERIMENT_BRANCHES",(t=>function(t,i){if(i)return function(t,i){return t.__AMP_EXPERIMENT_BRANCHES?t.__AMP_EXPERIMENT_BRANCHES[i]:null}(t,i)||"";const e=function(t){const i=et(t);return i.__AMP_EXPERIMENT_BRANCHES||(i.__AMP_EXPERIMENT_BRANCHES={}),Lt({},i.__AMP_EXPERIMENT_BRANCHES)}(t);return Object.keys(e).map((t=>`${t}:${e[t]}`)).join(",")}(this.es.win,t))),this.sx("AMPDOC_META",((t,i="")=>{var e;return null!==(e=this.es.getMetaByName(t))&&void 0!==e?e:i}))}getMacros(t){const i=t.getAttribute("type"),e={"COOKIE":i=>function(t,i,e){return gi(t,i)?ni(t,e):null}(this.es.win,t,i),"CONSENT_STATE":ee(t),"CONSENT_STRING":$i(t),"CONSENT_METADATA":i=>function(t,i){return function(t,i="default"){return gt(t).then((t=>t?t.getConsentMetadataInfo(i):null))}(t).then((t=>t?t[i]:null))}(t,J(i,"CONSENT_METADATA macro must contain a key")),"SESSION_ID":()=>this.nMt(i,Ni),"SESSION_TIMESTAMP":()=>this.nMt(i,Ci),"SESSION_COUNT":()=>this.nMt(i,xi),"SESSION_EVENT_TIMESTAMP":()=>this.nMt(i,Li),"SESSION_ENGAGED":()=>this.nMt(i,Di)},s=Ti(t)?{}:{"FIRST_CONTENTFUL_PAINT":()=>At(this.es.win).getMetric("fcpv"),"FIRST_VIEWPORT_READY":()=>At(this.es.win).getMetric("pc"),"MAKE_BODY_VISIBLE":()=>At(this.es.win).getMetric("mbv"),"LARGEST_CONTENTFUL_PAINT":()=>At(this.es.win).getMetric("lcpv"),"FIRST_INPUT_DELAY":()=>At(this.es.win).getMetric("fid"),"CUMULATIVE_LAYOUT_SHIFT":()=>At(this.es.win).getMetric("cls")};return Lt(Lt(Lt({},this.f5),e),s)}nMt(t,i){return this.eMt.then((e=>e.getSessionValue(t,i)))}sx(t,i){K(!this.f5[t]),this.f5[t]=i}expandTemplate(t,i,e,s,n){return function(t,i,e){const s=[];let n=0;return t.replace(i,(function(i){const r=arguments[arguments.length-2];s.push(t.slice(n,r)),n=r+i.length;const o=e.apply(null,arguments);return s.push(o),""})),s.push(t.slice(n)),Promise.all(s).then((t=>t.join("")))}(t,/\${([^}]*)}/g,((t,r)=>{if(i.iterations<0)return G().error(qi,"Maximum depth reached while expanding variables. Please ensure that the variables are not recursive."),t;if(!r)return"";const{argList:h,name:u}=Qi(r);if(i.freezeVars[u])return t;let c=i.getVar(u);const a=Et(e);if("string"==typeof c)c=this.rMt(c,i,e,a,s,n,h);else if(o(c)){for(let t=0;t<c.length;t++)c[t]="string"==typeof c[t]?this.rMt(c[t],i,e,a,s,n):c[t];c=Promise.all(c)}return Promise.resolve(c).then((t=>i.noEncode?t:Zi(t)))}))}rMt(t,i,e,s,n,r,o){return this.expandTemplate(t,new Gi(i.vars,i.iterations-1,!0),e,n,r).then((t=>s.expandStringAsync(o?t+o:t,n||this.getMacros(e),r)))}sMt(t){return mt(this.es.win).sha384Base64(t)}}),t.registerElement(xs,Hs)})();
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}});